client_id and credentials, establishing a trusted identity for the OAuth 2.1 flow.
You can register your client in two ways: statically or dynamically. For most scenarios, especially in production, we strongly recommend static client registration for its superior security and control.
In the upcoming authorization specification from MCP, CIMD will be introduced as the recommended method for client registration. Support for this new approach in Auth0 is planned and will be available soon.
Static client registration (recommended for production)
Static client registration is a deliberate, manual process where you register your client application directly in the Auth0 Dashboard or via the Management API before your application is deployed. This approach gives you complete control over which clients can connect to your resources. This method is recommended because it offers several key advantages:- Enhanced Security: You explicitly approve every client, preventing unauthorized or malicious applications from registering themselves and accessing your system.
- Predictable Configuration: The client_id and other settings are known in advance, simplifying deployment and configuration management.
- Clear Auditing: There is a clear, auditable trail for every client created, linking it to a specific developer or team.
- Principle of Least Privilege: You can precisely configure the exact permissions (scopes) and settings for each client from the outset.
Dynamic Client Registration (DCR)
Dynamic Client Registration (DCR) allows client applications to register themselves automatically by making an API request to a registration endpoint. While this offers flexibility for certain highly dynamic architectures, it introduces significant security risks if not properly secured.The Dangers of an Open DCR Endpoint
Auth0 supports an open DCR endpoint, which means that if you enable this feature without additional protections, anyone on the internet can create applications in your tenant. This exposes you to several threats:- Resource Exhaustion: A malicious actor could run a script to register millions of applications, potentially causing a denial-of-service by filling up your tenant’s application limit.
- Unauthorized Access Attempts: Attackers can register their own clients to probe your system for vulnerabilities or attempt to gain unauthorized access.
- Tenant Misconfiguration: Unvetted, automated registrations can lead to clients being created with insecure settings, creating weak points in your security posture.
- Lack of Oversight: Without strict monitoring, it becomes difficult to track who is registering clients and for what purpose.
Securing an Open DCR Endpoint
Open Dynamic Client Registration (Open DCR) enables flexible MCP integrations but exposes your tenant to potential abuse if left unauthenticated. Without security controls, anyone can create applications in your tenant, potentially leading to resource exhaustion, unauthorized access attempts, or tenant misconfiguration.These security options are available to Enterprise customers only. To upgrade your plan, contact Auth0 Sales.
Tenant Access Control List (Recommended)
Restrict which IP address ranges or domains can access your tenant’s DCR endpoints through Auth0’s built-in Tenant Access Control List (ACL) feature. This approach protects both your custom domain and canonical Auth0 hostname (e.g.,tenant.auth0.com), providing comprehensive protection.
It’s ideal when you know the IP ranges of legitimate clients (such as your internal network or specific cloud providers) and want to enforce network-based access control without managing additional infrastructure.
Reverse Proxy
Place a reverse proxy (such as Cloudflare) in front of your custom domain to rate-limit, filter, and authenticate requests before they reach the DCR endpoint. This approach allows you to control request volume, implement custom authentication logic, and monitor traffic patterns. However, note that even with a reverse proxy on your custom domain, the DCR endpoint remains accessible via your canonical Auth0 hostname (e.g.,tenant.auth0.com), which can bypass the proxy. For comprehensive protection, use this approach in combination with Tenant ACL.
Defense in Depth
Both approaches can be used together for defense-in-depth security. Regardless of which approach you choose, monitor your tenant logs to detect suspicious registration patterns.Monitoring DCR Activity
Regularly review your tenant logs to identify suspicious patterns such as rapid application creation or registrations from unexpected sources. To monitor client registrations:- Navigate to Monitoring > Logs in your Auth0 Dashboard
-
Use the search query:
type:sapi AND description:"Dynamic client registration"This filters for successful Management API operations (sapi) specifically related to Dynamic Client Registration events. -
Review the log entries for:
- Unusual volume: Multiple clients created in a short time span
- Unexpected sources: Registrations from unfamiliar IP addresses or locations
- Suspicious patterns: Similar client names, callback URLs pointing to unexpected domains, or clients created outside business hours
Authentication and Authorization for MCP Servers
When an MCP server is exposed to the internet, it must be secured. The MCP specification recommends using OAuth 2.1 to secure these interactions. This allows an MCP server to delegate authentication to a dedicated authorization server and manage access control for different clients, users, and actions using scopes.Mandatory Server Configuration
For a client to interact with your server, the MCP specification requires you to announce your authorization configuration and use standard HTTP responses.-
Use the
WWW-AuthenticateHeader for 401 Errors When a client makes a request without a valid token, your server must return a401 Unauthorizedstatus. Crucially, this response must include theWWW-Authenticateheader, pointing to the metadata URL you configured above. This signals to the client that authentication is required and tells it exactly. -
Announce Your Auth Server with Protected Resource Metadata (RFC 9728)
Your MCP server must tell clients where to get authorized. To do this, you must expose a metadata endpoint. Create a
.well-known/oauth-protected-resourceendpoint on your server that returns a JSON object pointing to your Auth0 tenant. This allows MCP clients to automatically discover your authorization endpoints without manual configuration.