mcp-data-platform-v1.55.2
Resource permission system no longer hard-codes role names
The resource permission system (isPlatformAdmin and isPersonaAdmin) checked for literal role strings like "admin", "platform-admin", and "persona-admin:finance". This failed when roles carried an OIDC prefix configured via role_prefix — the raw role strings (e.g., myprefix_admin) didn't match the hard-coded literals even though the persona mapper correctly resolved the prefixed role to the admin persona.
Impact: Users with prefixed admin roles could not write to global-scope managed resources, and persona admins with prefixed roles could not write to their persona's resources. Deployments without a role_prefix were unaffected.
What changed
isPlatformAdmin — now checks Claims.IsAdmin (a boolean resolved at auth time by comparing the user's persona against the configured admin persona from Config.Admin.Persona). The existing literal role checks ("admin", "platform-admin") remain as backward-compatible fallback for deployments that assign roles directly without persona mapping.
isPersonaAdmin — now checks Claims.AdminOfPersonas (a string slice resolved at auth time by extracting persona names from roles matching the persona-admin: pattern, tolerating any prefix). The existing literal role check remains as fallback.
MCPToolCallMiddleware — now accepts a ToolCallConfig struct instead of individual parameters. The struct carries AdminPersona (from platform config) so the middleware can set PlatformContext.IsAdmin during auth/authz. This also resolved a lint violation (6 positional arguments exceeded the 5-argument limit).
Both code paths updated:
- MCP path:
MCPToolCallMiddlewaresetsPlatformContext.IsAdminafter persona resolution. The managed resources middleware propagates it toresource.Claims. - REST API path:
buildResourceClaimssetsClaims.IsAdminandClaims.AdminOfPersonasfrom the persona registry and role patterns.
Upgrade notes
- No config changes required. The fix reads the existing
admin.personaconfig field (defaults to"admin") to determine which persona grants platform admin. - Deployments using
role_prefixin their OIDC config will now correctly grant resource write permissions to admin and persona-admin users. - The
ToolCallConfigstruct is a breaking API change for anyone callingMCPToolCallMiddlewaredirectly outside this codebase. The fix is to replace positional arguments with the struct.
Installation
Homebrew (macOS)
brew install txn2/tap/mcp-data-platformClaude Code CLI
claude mcp add mcp-data-platform -- mcp-data-platformDocker
docker pull ghcr.io/txn2/mcp-data-platform:v1.55.2Verification
All release artifacts are signed with Cosign. Verify with:
cosign verify-blob --bundle mcp-data-platform_1.55.2_linux_amd64.tar.gz.sigstore.json \
mcp-data-platform_1.55.2_linux_amd64.tar.gz