Skip to content

Commit d4577b3

Browse files
committed
Document primaryUpstreamProvider in vMCP prose docs
Addresses #5199 review body (doc-strategy question): - docs/operator/virtualmcpserver-api.md: expand the authzConfig field description to document the full InlineAuthzConfig/ConfigMapAuthzRef shape, including primaryUpstreamProvider with its precondition (multiple upstreamProviders configured) and rejection behavior. - docs/operator/virtualmcpserver-kubernetes-guide.md: add a brief callout in the Authorization Policy Errors section explaining when to pin a specific upstream IDP via primaryUpstreamProvider.
1 parent f67a5dc commit d4577b3

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

docs/operator/virtualmcpserver-api.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ Configures authentication for clients connecting to the Virtual MCP server. Reus
8383
- `audience` (string, required): Must be unique per server to prevent token replay
8484
- `scopes` ([]string, optional): Defaults to `["openid"]`
8585
- `authzConfig` (AuthzConfigRef, optional): Authorization policy configuration
86+
- `type` (string, required): `inline` or `configMap`
87+
- `inline` (InlineAuthzConfig, required when type=inline): Inline Cedar policies
88+
- `policies` ([]string, required): Cedar policy strings
89+
- `entitiesJson` (string, optional): Cedar entities (JSON)
90+
- `primaryUpstreamProvider` (string, optional): Names the upstream IDP whose
91+
access token claims Cedar should evaluate. Only meaningful when
92+
`spec.authServerConfig` is set with multiple upstreamProviders. When
93+
empty, the controller defaults to the first upstream. Must match a
94+
configured upstream name; the VirtualMCPServer is rejected with
95+
`AuthServerConfigValidated=False` otherwise.
96+
- `configMap` (ConfigMapAuthzRef, required when type=configMap): Reference to a ConfigMap holding policies
8697

8798
**Important**: The `type` field must always be explicitly specified. When no authentication is required, use `type: anonymous`.
8899

docs/operator/virtualmcpserver-kubernetes-guide.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,20 @@ Then gradually add restrictions. Common Cedar policy issues:
625625
- Verify attribute names match token claims
626626
- Test policies with different user roles
627627

628+
**Multiple upstream IDPs**: when `spec.authServerConfig` declares more than
629+
one `upstreamProviders` entry, Cedar evaluates claims from the first one by
630+
default. Pin a specific provider explicitly via
631+
`authzConfig.inline.primaryUpstreamProvider`:
632+
633+
```yaml
634+
authzConfig:
635+
type: inline
636+
inline:
637+
primaryUpstreamProvider: okta # must match one of the configured upstreams
638+
policies:
639+
- 'permit(principal, action, resource);'
640+
```
641+
628642
### Backend Discovery Issues
629643

630644
#### Backends Not Discovered

0 commit comments

Comments
 (0)