Skip to content

Commit 58ded66

Browse files
committed
Fix several issues in docs
1 parent 57ec5cb commit 58ded66

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

docs/ai-gateway/mcp/policies/mcp-authorization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,18 @@ spec:
237237
- Result: ❌ Access Denied (insufficient scopes)
238238

239239
**Scenario 3**: User with claim `department="engineering"` attempts to read resource `file:///private/code`
240-
- Rule: `attribute.type="resource", attribute.name="file:///private/*", requiredClaims={department="engineering"}`
240+
- Rule: `attribute.type="resource", attribute.name="file:///private/code", requiredClaims={department="engineering"}`
241241
- Result: ✅ Access Granted
242242

243243
**Scenario 4**: User with claim `department="finance"` (no engineering) attempts to read resource `file:///private/code`
244-
- Rule: `attribute.type="resource", attribute.name="file:///private/*", requiredClaims={department="engineering"}`
244+
- Rule: `attribute.type="resource", attribute.name="file:///private/code", requiredClaims={department="engineering"}`
245245
- Result: ❌ Access Denied (claim mismatch)
246246

247247
## Error Handling
248248

249249
When authorization fails, the policy returns:
250250
- **HTTP Status**: `403 Forbidden`
251-
- **Response Body**: JSON error response with details about missing scopes and claims
251+
- **Response Body**: JSON error response with a reason message
252252
- **WWW-Authenticate Header**: Contains information about required scopes for the denied resource
253253

254254
## Related Policies

docs/gateway/mcp/policies/mcp-authorization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,18 @@ spec:
237237
- Result: ❌ Access Denied (insufficient scopes)
238238

239239
**Scenario 3**: User with claim `department="engineering"` attempts to read resource `file:///private/code`
240-
- Rule: `attribute.type="resource", attribute.name="file:///private/*", requiredClaims={department="engineering"}`
240+
- Rule: `attribute.type="resource", attribute.name="file:///private/code", requiredClaims={department="engineering"}`
241241
- Result: ✅ Access Granted
242242

243243
**Scenario 4**: User with claim `department="finance"` (no engineering) attempts to read resource `file:///private/code`
244-
- Rule: `attribute.type="resource", attribute.name="file:///private/*", requiredClaims={department="engineering"}`
244+
- Rule: `attribute.type="resource", attribute.name="file:///private/code", requiredClaims={department="engineering"}`
245245
- Result: ❌ Access Denied (claim mismatch)
246246

247247
## Error Handling
248248

249249
When authorization fails, the policy returns:
250250
- **HTTP Status**: `403 Forbidden`
251-
- **Response Body**: JSON error response with details about missing scopes and claims
251+
- **Response Body**: JSON error response with a reason message
252252
- **WWW-Authenticate Header**: Contains information about required scopes for the denied resource
253253

254254
## Related Policies

gateway/gateway-controller/default-policies/mcp-authz-v0.1.0.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ description: |
1212
All matching rules must be satisfied for access to be granted (AND logic). If multiple
1313
rules match the requested MCP attribute, ALL of their conditions must be met for
1414
authorization to succeed. This allows combining specific and wildcard rules to build
15-
layered authorization policies.
15+
layered authorization policies. If no rules are configured or no rule matches the
16+
requested attribute, access is allowed.
1617
1718
parameters:
1819
type: object
@@ -82,7 +83,7 @@ parameters:
8283
Map of JWT claim names to expected values. All specified claims must be present
8384
in the token and match their expected values for the rule to grant access.
8485
85-
Claim paths use dot notation (e.g., "sub", "custom.role", "org.team").
86+
Claim names must be top-level keys in the JWT (e.g., "sub", "role").
8687
Matching is performed as exact string equality.
8788
8889
If both requiredClaims and requiredScopes are specified, BOTH must be satisfied

gateway/policies/mcp-authz/v0.1.0/policy-definition.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ description: |
1212
All matching rules must be satisfied for access to be granted (AND logic). If multiple
1313
rules match the requested MCP attribute, ALL of their conditions must be met for
1414
authorization to succeed. This allows combining specific and wildcard rules to build
15-
layered authorization policies.
15+
layered authorization policies. If no rules are configured or no rule matches the
16+
requested attribute, access is allowed.
1617
1718
parameters:
1819
type: object
@@ -82,7 +83,7 @@ parameters:
8283
Map of JWT claim names to expected values. All specified claims must be present
8384
in the token and match their expected values for the rule to grant access.
8485
85-
Claim paths use dot notation (e.g., "sub", "custom.role", "org.team").
86+
Claim names must be top-level keys in the JWT (e.g., "sub", "role").
8687
Matching is performed as exact string equality.
8788
8889
If both requiredClaims and requiredScopes are specified, BOTH must be satisfied

0 commit comments

Comments
 (0)