Support named allowed-resource policies for mTLS clients

Aperta
#4,125 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@strehle ci sta già lavorando.

Dal 6/11/2026.

  • #4137 di @strehle — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

Start by reading the merged mTLS/RFC 8707 work in pull request #4109 and the named mTLS trust bundle configuration and reference-resolution paths. Trace how client configuration is validated and persisted, then how resource requests are checked during token issuance. Done means named policies resolve within the identity zone, policy updates affect new requests, invalid or conflicting references fail closed, and existing inline-list behavior remains compatible.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

The RFC 8707 support merged in #4109 lets an mTLS client register tls-client-auth-allowed-resources and request a token for one of those resources.

For Cloud Foundry workload service accounts, the permitted federation audiences should be platform-operator configuration, shared by many account clients. For example, an operator might permit AWS STS and Azure token exchange. Brokers and application teams separately manage the external grants that trust each service account.

Copying that list into every UAA client introduces a batch-update problem: adding or removing a federation audience requires rewriting every account client. It is the same configuration-distribution problem that named mTLS CA trust bundles solve. This came up while addressing CAPI team feedback on the RFC.

Proposed enhancement

Add named, operator-managed allowed-resource policies, resolved in the client's identity zone, and allow clients to reference one instead of embedding the resource list.

Illustrative default-zone operator configuration (proposed names):

uaa:
  mtls:
    resource_policies:
      cf-workload-federation:
        allowed_resources:
          - https://sts.amazonaws.com
          - api://AzureADTokenExchange

Illustrative client registration:

{
  "client_id": "cf:service-account:payments-worker",
  "authorized_grant_types": ["client_credentials"],
  "tls-client-auth-ca-ref": "diego-instance-identity",
  "tls_client_auth_san_dns": "payments-worker.svc.identity",
  "tls-client-auth-allowed-resources-ref": "cf-workload-federation"
}

The app's token request remains unchanged:

POST /oauth/mtls/token
grant_type=client_credentials
&client_id=cf:service-account:payments-worker
&resource=https://sts.amazonaws.com

UAA resolves the policy and applies the same RFC 8707 validation and audience selection as for the existing inline list. The client reference remains stable when policy contents change.

These are illustrative audiences; each relying party must be configured to accept the selected value. Allowing an audience does not grant cloud access: external providers still validate the issuer and subject and enforce their own grants.

Expected behavior

  • Reuse the identity-zone configuration and reference-resolution approach of named mTLS trust bundles. Never fall back to another zone's policy.
  • Validate policy definitions when configuration is written, using the existing allowed-resource rules (absolute URIs without fragments).
  • Reject unknown/blank policy references at client create/update/bootstrap time.
  • Make inline tls-client-auth-allowed-resources and its reference mutually exclusive; retain inline-list compatibility for existing clients.
  • Preserve the existing mutual exclusion with audience templates.
  • Resolve the policy during token issuance so updates apply without rewriting client registrations or scanning clients/zones.
  • Fail closed if a referenced policy is removed or cannot be resolved; never fall back to a default audience in response to an explicit resource request.
  • Adding a resource permits new requests for it; removing it refuses new requests. Existing tokens and credentials already exchanged retain their existing lifetimes.
  • Keep all certificate-authentication, exact subject-binding and certificate-bound-token policy checks unchanged.

Suggested verification

  • Register one client by policy reference and obtain a token for an allowed resource; reject a disallowed resource.
  • Change the policy without updating that client: allow a newly added resource and deny a removed resource.
  • Verify zone isolation, unknown/removed references, conflicting inline/reference/template configuration, and client API/bootstrap persistence.
  • Verify existing inline-list clients and deployments not using the feature retain their behavior.

This is a follow-up to the merged mTLS/RFC 8707 work, not a request to change RFC 8707 semantics.

Lingua principale
Java
Stelle
1.6k
Fork
847
Merge medio
2g 1h
PR unite (30g)
48

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudfoundry/uaa

Tutte le issue di cloudfoundry/uaa

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.