@@ -174,10 +174,10 @@ This section discusses the reference implementation using Amazon Cognito as the
174
174
The enhanced auth server provides dual authentication support:
175
175
- ** Primary Check** : Session cookie validation using ` itsdangerous.URLSafeTimedSerializer `
176
176
- ** Fallback** : JWT token validation with Cognito
177
- - ** Group Mapping** : Maps Cognito groups to MCP scopes
178
- - ` mcp-admin ` → Full unrestricted access
179
- - ` mcp-user ` → Restricted read access
180
- - ` mcp-server-* ` → Server-specific execute access
177
+ - ** Group Mapping** : Maps Cognito groups to MCP scopes via ` scopes.yml ` configuration
178
+ - Groups are mapped to scopes using the ` group_mappings ` section in ` scopes.yml `
179
+ - Both M2M and session cookie auth use the same scope definitions
180
+ - Example mappings: ` mcp-admin ` → unrestricted access, ` mcp-user ` → restricted read
181
181
182
182
#### 2. CLI Authentication Tool (` auth_server/cli_auth.py ` )
183
183
A standalone tool for user-based authentication:
@@ -274,10 +274,10 @@ Key features:
274
274
The auth server validates session cookies alongside JWT tokens:
275
275
- Checks for ` mcp_gateway_session ` cookie in request headers
276
276
- Validates cookie signature using ` itsdangerous.URLSafeTimedSerializer `
277
- - Maps Cognito groups to MCP scopes:
278
- - ` mcp-admin ` → unrestricted read/execute access
279
- - ` mcp-user ` → restricted read access
280
- - ` mcp-server-{name} ` → server-specific execute access
277
+ - Maps Cognito groups to MCP scopes using ` scopes.yml ` configuration :
278
+ - Configuration-driven mapping ensures consistency with M2M authentication
279
+ - Group mappings defined in ` group_mappings ` section of ` scopes.yml `
280
+ - Single source of truth for all permission definitions
281
281
- Falls back to JWT validation if no valid cookie found
282
282
283
283
#### Advantages:
0 commit comments