Repository navigation
Description
Background
PR #5121 added GroupEntityType to cedar.ConfigOptions so deployments can configure the entity type the Cedar authorizer uses when building principal parent UIDs from JWT group/role claims. GroupClaimName and RoleClaimName were already present. All three fields are read from authz.json at runtime by MCPServer and MCPRemoteProxy, which load the file directly via LoadConfig() → ConfigOptions.
The enterprise controller writes all three into authz.json:
{
"cedar": {
"group_entity_type": "ClaimGroup",
"group_claim_name": "groups",
"role_claim_name": "roles"
}
}Problem
The vmcp internal AuthzConfig struct (pkg/vmcp/config/config.go) only carries:
type AuthzConfig struct {
Type string `json:"type"`
Policies []string `json:"policies,omitempty"`
PrimaryUpstreamProvider string `json:"primaryUpstreamProvider,omitempty"`
}GroupEntityType, GroupClaimName, and RoleClaimName are absent. The operator converter (pkg/vmcpconfig/converter.go) builds this struct manually for both the inline and ConfigMap paths, and has nowhere to put these values. They are silently dropped.
As a result, the Cedar authorizer inside the vmcp binary is always constructed with:
GroupEntityTypedefaulting to"THVGroup"(the upstream hardcoded legacy value)GroupClaimNamedefaulting to the well-known fallback list (groups,roles,cognito:groups)RoleClaimNameempty
For deployments using the enterprise controller, the static entity store uses ClaimGroup entities. Because GroupEntityType is never forwarded, the runtime Cedar authorizer builds THVGroup:: parents for the principal while the static entity store has ClaimGroup:: entities — severing the Client → ClaimGroup → PlatformRole hierarchy. Cedar in checks silently evaluate to false and all group/role-scoped policies deny.
This affects both the inline path today and the ConfigMap path once #5208 lands.
Fix
- Add
GroupEntityType,GroupClaimName, andRoleClaimNametopkg/vmcp/config/config.go'sAuthzConfigstruct. - Wire them through the Cedar authorizer factory so the vmcp binary passes them to
NewCedarAuthorizerviaConfigOptions. - For the ConfigMap path (vMCP: Load authz config from ConfigMap (policies + primaryUpstreamProvider) #5208): extract all three from the parsed
authz.jsonand populate them intoAuthzConfig. - For the inline path: either add these fields to
InlineAuthzConfig(CRD change), or lift them toAuthzConfigRefas part of vMCP: Load authz config from ConfigMap (policies + primaryUpstreamProvider) #5208's Option B schema decision — the approach should be coordinated with that issue.
Related
- vMCP: Load authz config from ConfigMap (policies + primaryUpstreamProvider) #5208 — converter ConfigMap loading (the ConfigMap path won't forward these without this fix)
- Make Cedar group entity type name configurable #5121 — added
GroupEntityTypetoConfigOptions(the receiving end this issue completes for vMCP) - VirtualMCPServer controller should re-reconcile when a referenced authz ConfigMap changes #5270 — authz ConfigMap watch (companion to vMCP: Load authz config from ConfigMap (policies + primaryUpstreamProvider) #5208)
Acceptance criteria
- A VirtualMCPServer with Cedar group/role policies enforces them correctly at runtime
group_entity_type,group_claim_name, androle_claim_namefrom an enterpriseauthz.jsonConfigMap are forwarded into the vmcpconfig.yamland reach the Cedar authorizer
Activity
jhrozek commentedon May 14, 2026
Follow-up:
EntitiesJSONis also absent frompkg/vmcp/config/config.go'sAuthzConfigstruct (confirmed via grep — noentities_jsonfield exists). This is equally needed: without it the Cedar authorizer inside vMCP gets an empty entity store, breaking transitiveClaimGroup → PlatformRolelookups that enterprise policies depend on for server-scoped resource checks. The fix in item 1 above should addEntitiesJSON stringalongside the three fields already listed.Resolve authz `ConfigMap` for `VirtualMCPServer`
Resolve authz `ConfigMap` for `VirtualMCPServer`
Resolve authz `ConfigMap` for `VirtualMCPServer`
Resolve authz `ConfigMap` for `VirtualMCPServer`
Resolve authz `ConfigMap` for `VirtualMCPServer`
Resolve authz `ConfigMap` for `VirtualMCPServer`
Resolve authz `ConfigMap` for `VirtualMCPServer`
Resolve authz `ConfigMap` for `VirtualMCPServer` (stacklok#5290)