Support named allowed-resource policies for mTLS clients
Maintainers usually reply within 1 day
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
- Domain
- authentication
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-resourcesand 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudfoundry/uaa
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cloudfoundry/uaa#4194 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
cloudfoundry/uaa#4189 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
cloudfoundry/uaa#4156 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
cloudfoundry/uaa#4086 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
cloudfoundry/uaa#3735 ·
Maintainers usually reply within 1 day
All issues in cloudfoundry/uaa
Similar issues
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-edc/IdentityHub#1296 ·
Maintainers usually reply within 1 day
-
area: ui priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
tetsuji16/microProject#1721 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
The engine's "loaded, but had errors" message leaves out which library and line each error is inOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cqframework/clinical_quality_language#1980 ·
Maintainers usually reply within 3 days
-
windows-sys 0.101.0Open
Difficulty 2/5 1-3 hours Newbie friendliness 61/100