Skip to content

Integrate SPIFFE principals with OAuth grants and discovery #6204

Description

@jhrozek

Description

Make both SPIFFE authentication methods produce equivalent OAuth behaviour:
client_credentials tokens whose subject is the workload, RFC 8693 delegation
with the workload as actor, and discovery metadata that advertises exactly the
methods actually available.

This is where the epic's central guarantee is either enforced or quietly lost.
Two credentials for the same SPIFFE ID must yield the same sub, the same
act, the same scopes, audiences, expiry and Cedar inputs. The authentication
method is an audit fact, not an authorization input.

Scope

  • Make client_credentials issue tokens whose subject is the associated SPIFFE
    ID.
  • Make RFC 8693 token exchange use the authenticated SPIFFE principal as
    act.sub.
  • Bind an optional actor token to that same principal.
  • Require explicit client authorization for both client_credentials and token
    exchange.
  • Require and authorize the target MCP resource.
  • Constrain requested scopes and resources by both workload policy and
    source-token authority, whichever is narrower.
  • Add spiffe_x509 and spiffe_jwt to the dynamic discovery-metadata
    mechanism.
  • Record the authentication method for audit without letting it change
    authorization semantics.

What belongs to other issues

This sub-issue has more external dependencies than any other, and its scope is
easy to over-draw. Three pieces are explicitly not to be built here:

Acceptance criteria

  • X.509-SVID and JWT-SVID authentication for the same SPIFFE ID produce
    equivalent sub, act, scopes, audiences, expiry and Cedar inputs.
  • Public clients cannot use client_credentials or token exchange.
  • Token exchange is unavailable without an explicitly permitted confidential
    client association.
  • An actor token, when supplied, must be bound to the authenticated workload
    principal.
  • Requested scope and resource cannot exceed workload entitlement or
    source-token authorization.
  • Discovery advertises exactly spiffe_x509, spiffe_jwt, or both, according
    to operational configuration — never an unavailable method.
  • Existing secret-authenticated confidential clients continue to use only their
    registered grants.
  • Public-only deployments' discovery metadata stays byte-identical.

Dependencies

Do not start this until the discovery-metadata and consent pieces have landed or
been explicitly claimed.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions