Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The owning-space deletion contract and safeguards against unbounded global tombstones need definition.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Proposes space-owned service accounts for stable, secretless Cloud Foundry workload identities.
Changes:
- Defines account lifecycle, permissions, quotas, and app assignments.
- Specifies UAA JWT federation, broker integration, and CAPI access.
- Extends identity-aware routing for service-account identities.
| File | Description |
|---|---|
toc/rfc/rfc-draft-service-accounts.md |
Adds the service-account RFC and developer workflows. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
IMO this feels like a lot of new concepts and lifecycle machinery for what the federation case actually needs, and most of it looks like it's there to manage the new resource rather than solve the original problem. mTLS auth with SAN matching is already in the UAA, the actual gap is just a stable identifier that a selected set of apps can share. Instead of a new first-class resource, could that association just be an app label? e.g. cf set-label app payments-api identity.cloudfoundry.org/service-account=payments-workerThat's the SPIFFE/OIDC workload-identity style, and space-scoping also drops the need for the creation budget. Today UAA matches against a pre-registered SAN, so for this to work it'd need to read the subject straight from the cert instead. And the SAN would have to be space-scoped, so one app can't grab another space's identity. |
|
@pbusko — responding to your suggestion to use app labels and space-scoped identities:
I explored SPIFFE-based identity earlier, including an end-to-end UAA/Diego POC and research on name-derived identities. The main question is the canonical identity and its lifecycle, rather than how an app expresses its assignment. At Rabobank, a recurring requirement—raised repeatedly during the route-policy work—is human-readable, stable identifiers that teams can use directly in external authorization policies. Those identifiers must also be known before the platform exists. For disaster recovery, we want to pre-create external WIF roles and trust policies, then recreate the platform and push apps using predetermined identities. Requiring each team to create CF resources, retrieve a generated GUID-based identity, provision external roles, and only then deploy introduces sequencing and state-management complexity into every application pipeline. A space GUID plus an account label could form a valid SPIFFE ID, but would not meet that pre-provisioning requirement and would change when the space is recreated. Using org/space names instead introduces other problems: CF permits names up to 255 characters, including printable punctuation and Unicode, and those names are mutable. SPIFFE path segments permit only letters, digits, dots, dashes and underscores, and prohibit percent-encoding. Lossy sanitization/truncation introduces collisions; name-based paths change on rename. Deterministic hashing can address representation, but sacrifices readability. The proposed account name is therefore human-readable, immutable and chosen in advance, independently of platform-generated GUIDs. External policies can be prepared for This does not rule out SPIFFE: the predetermined account name could appear in a URI SAN. The distinction is the identity model, not DNS versus URI encoding. A label could be an assignment UX, but needs platform-controlled authorization and issuance: ordinary metadata must not let an app claim an identity with existing grants. Explicit CAPI roles, broker grants and disable/delete behavior also need lifecycle semantics independent of any one app. That is why the RFC models the shared identity as a resource.
That changes the authentication profile. RFC 8705 Space-scoping could avoid foundation-wide name contention, but still needs a predetermined, stable namespace and name-reuse semantics. The creation budget is configurable, including unlimited for internal platforms. |
|
Pushed fe94f46: a restructure of the RFC based on feedback that it was hard to read, plus several design simplifications from the discussion here and on the UAA PR. Readability
Clearer motivation
Team-owned cloud resources are now the primary path
Simpler broker integration
Token and UAA details made concrete
The PR description has been updated to match. |


Index
Summary
Propose service accounts: named identities that a team creates in a space and assigns to one or more apps. Apps prove their account with the certificate Cloud Foundry already gives every instance and exchange it for short-lived UAA tokens. No secret is ever handed to the app.
The main use is workload identity federation (WIF) with cloud services, whether owned by the application team or provisioned by a service broker. The same identity also lets coding agents running as CF apps call the Cloud Foundry API, and authorizes app-to-app routes.
One account, multiple apps, no shared secrets, explicit permissions.
Why
Platform teams need workload identities that are shared by a chosen set of apps, stable across app replacement and renames, human-readable, known before the platform exists (so external roles can be created in advance, including for disaster recovery), secretless, and explicitly authorized. For the most sensitive data, teams often own their cloud accounts and write trust policies themselves, so a readable, predetermined identity matters. Instance, app, org and space identities each fail at least one of these requirements.
Proposal at a glance
cf create-service-account payments-worker, thencf bind-service-account APP payments-worker. An app has at most one account; many apps in the owning space can share one. Changes apply on restart.cf:service-account:payments-worker, certificate SANpayments-worker.svc.identity, and route-policy sourcecf:svc:payments-worker. Names are immutable, foundation-unique RFC 1123 labels; deleted names stay reserved.cf bind-serviceis unchanged. Cloud Controller adds the account's issuer and subject to the CFcontextof the bind request; the broker creates and removes its grant. No new plan capability.cnf, since cloud WIF does not verify proof of possession; this can be revisited later. Tokens carry instance/app/space/org GUIDs for audit.Three Mermaid diagrams cover provisioning, token exchange with AWS STS, and a coding agent calling Cloud Controller. An appendix covers OSBAPI, an example RDS binding, the UAA client registration, platform components and CA rotation.
Existing work
UAA certificate-based client authentication is implemented and agreed with the UAA team, pending final review in UAA #4076, including the opt-in certificate-binding policy, validated in a CF lab.
Companion drafts: Cloud Controller #5520, capi-release #702, BBS #168, Diego #1216, CLI #3875.
Review requested
The next step is community review and RFC approval of the identity model and developer experience. The RFC status remains Draft; no RFC number or FCP is requested yet.
@cloudfoundry/toc — relevant working groups include App Runtime Interfaces, App Runtime Platform and App Runtime Deployments. Feedback is requested from CAPI, Diego/BBS, UAA, CLI, networking and service-broker maintainers.