Securing a distributed, multi-tenant platform that spans organizational boundaries requires a deliberate architectural approach. Traditional monolithic security models, where authentication and authorization are tightly coupled within a single system, fail to address the dynamic nature of service ecosystems where service providers, service consumers, and marketplace operators interact across isolated control planes.
Platform Mesh addresses this challenge through a clear separation of authentication and authorization as independent architectural concerns, each implemented by purpose-built components that can evolve, scale, and be replaced independently. This design aligns directly with the decoupling principle that guides the overall architecture: security subsystems, like all other components, should be directly usable without requiring the complete framework.
For the runtime view — which component plays which role and how requests pass through the authorizer chain — see Identity and authorization.
Platform Mesh is accessed through multiple client types, each with distinct interaction patterns.
UI clients interact through a Kubernetes-GraphQL-Gateway, kubectl users communicate directly with kcp via the KRM API, and AI agents are expected to interact through a dedicated MCP (Model Context Protocol) server1.
Regardless of the client type, all requests ultimately reach kcp, where the same authentication and authorization mechanisms apply uniformly.
flowchart LR
UI[UI Client] --> GW[GraphQL Gateway]
CLI[kubectl] --> KCP
GW --> KCP[kcp]
AI[AI Client] -.-> MCP["MCP Server (planned)"]
MCP -.-> KCP
style MCP stroke-dasharray: 5 5
style AI stroke-dasharray: 5 5
Once a request reaches kcp, the authentication configuration establishes the caller’s identity, and a layered authorizer chain decides whether the request is allowed. RBAC handles structural, resource-type access; the authorization webhook forwards anything RBAC has no opinion on to OpenFGA for relationship-based evaluation.
flowchart TD
KCP[kcp] --> AUTHN[AuthN Config]
AUTHN -->|OIDC| KC[Keycloak]
AUTHN --> SA[ServiceAccounts]
KC -->|identity established| RBAC[RBAC]
SA -->|identity established| RBAC
RBAC -->|granted| RES[Access Granted]
RBAC -->|denied| DENY[Access Denied]
RBAC -->|no opinion| WH[AuthZ Webhook]
WH -->|check| FGA[OpenFGA]
FGA -->|granted| RES
FGA -->|denied| DENY
Authentication and authorization are independent subsystems, reflecting Platform Mesh guiding principles. The two are connected solely through the OIDC token: authentication produces it, authorization consumes the identity claims within it. While OIDC tokens carry claims such as group memberships that inform RBAC decisions, the token should establish who the caller is, not what they are allowed to do — encoding permissions as group claims is an anti-pattern that blurs this boundary. They share no other state, meaning each can evolve, scale, and be replaced independently. Both are integrated through standard Kubernetes extension points (authentication configurations for identity providers and authorization webhooks for authorizers), enabling alternative implementations that satisfy the same interfaces.
However, Platform Mesh provides specific integration with Keycloak and OpenFGA, such as per-organization realm and store provisioning, identity brokering configuration, and dynamic authorization schema generation. Replacing either component with an alternative would require reimplementing these integration aspects.
:::info NOTE Platform Mesh security architecture represents ongoing research in distributed authorization patterns. The model continues to evolve to support enhanced cross-provider authorization scenarios, relationship-based authorization model management, and advanced authorization propagation across the account hierarchy. :::
Platform Mesh security architecture builds on kcp’s own security foundations, including workspace isolation, APIExport identity, and permission claims. For a detailed analysis of these foundations, see the kcp Security Self-Assessment (particularly the Security Functions and Features section) and the security section of kcp’s General Technical Review.
The security architecture integrates deeply with the Platform Mesh account model, ensuring that security boundaries align with organizational boundaries throughout the hierarchy.
The MCP server for Platform Mesh is a planned future component. ↩