Skip to content

Commit 4715bdc

Browse files
committed
promote security considerations to top level section
1 parent 42a08cf commit 4715bdc

File tree

1 file changed

+13
-27
lines changed

1 file changed

+13
-27
lines changed

docs/specification/draft/basic/authorization.mdx

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,6 @@ MCP client **MUST NOT** send tokens other than issued by the MCP authorization s
247247
MCP servers **MUST** only issue tokens that are valid for use with their own resources.
248248
MCP servers **MUST NOT** accept or transit any other tokens.
249249

250-
### 2.7 Security Considerations
251-
252-
The following security requirements **MUST** be implemented:
253-
254-
1. Clients **MUST** securely store tokens following OAuth 2.0 best practices
255-
2. Servers **SHOULD** enforce token expiration and rotation
256-
3. All authorization endpoints **MUST** be served over HTTPS
257-
4. Servers **MUST** validate redirect URIs to prevent open redirect vulnerabilities
258-
5. Redirect URIs **MUST** be either localhost URLs or HTTPS URLs
259-
260250
### 2.8 Error Handling
261251

262252
Servers **MUST** return appropriate HTTP status codes for authorization errors:
@@ -275,27 +265,23 @@ Servers **MUST** return appropriate HTTP status codes for authorization errors:
275265
1. **SHOULD** implement token rotation for enhanced security
276266
1. Token lifetimes **SHOULD** be limited based on security requirements
277267

278-
## 3. Best Practices
279268

280-
#### 3.1 Local clients as Public OAuth 2.1 Clients
269+
## 3. Security Considerations
281270

282-
We strongly recommend that local clients implement OAuth 2.1 as a public client:
271+
### 3.1 Client Token Theft
272+
An attacker who gains access to a client's stored tokens can make unauthorized requests to resource servers. Clients MUST securely store tokens following OAuth 2.0 best practices.
283273

284-
1. Utilizing code challenges (PKCE) for authorization requests to prevent interception
285-
attacks
286-
2. Implementing secure token storage appropriate for the local system
287-
3. Following token refresh best practices to maintain sessions
288-
4. Properly handling token expiration and renewal
274+
### 3.2 Server Token Theft
275+
An attacker who compromises an authorization server may access stored tokens. Servers SHOULD enforce token expiration and rotation to limit the window of exploitation.
289276

290-
#### 3.2 Authorization Metadata Discovery
277+
### 3.3 Token Interception
278+
An attacker positioned between clients and servers can intercept tokens transmitted over insecure connections. All authorization endpoints MUST be served over HTTPS.
291279

292-
We strongly recommend that all clients implement metadata discovery. This reduces the
293-
need for users to provide endpoints manually or clients to fallback to the defined
294-
defaults.
280+
### 3.4 Open Redirection
281+
An attacker may craft malicious redirect URIs to direct users to phishing sites. Servers MUST validate redirect URIs against pre-registered values to prevent redirection attacks.
295282

296-
#### 3.3 Dynamic Client Registration
283+
### 3.5 Insecure Redirect URIs
284+
An attacker can capture data transmitted to non-secure endpoints. Redirect URIs MUST be either localhost URLs or HTTPS URLs to prevent token and code interception.
297285

298-
Since clients do not know the set of MCP servers in advance, we strongly recommend the
299-
implementation of dynamic client registration. This allows applications to automatically
300-
register with the MCP server, and removes the need for users to obtain client ids
301-
manually.
286+
### 3.6 Confused Deputy Problem
287+
An attacker can exploit OAuth proxy configurations that share 3rd party client credentials across multiple users. When an MCP server fronts another authorization server that does not support dynamic client registration, the MCP uses a static client_id with the backing service. If the backing service sets cookies after user authorization, an attacker can craft malicious authorization requests that bypass consent screens for previously authorized applications. MCP servers using a static client_id for a backing service MUST require explicit approval for each newly registered dynamic clients prior to forwarding requests to the backing authorization server for user consent.

0 commit comments

Comments
 (0)