Support named allowed-resource policies for mTLS clients

Open
#4,125 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@strehle is already working on this.

Since Nov 6, 2026.

  • #4137 by @strehle — open

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
java

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Java
Stars
1.6k
Forks
847
Avg merge
2d 1h
Merged PRs (30d)
48

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudfoundry/uaa

All issues in cloudfoundry/uaa

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.