Repository navigation
Conversation
This was referenced Oct 6, 2026
rkoster
marked this pull request as ready for review
November 19, 2026 11:52
There was a problem hiding this comment.
🟡 Changes recommended
The root models dependency and vendored sources still lack ServiceAccount support, causing the server to discard account identities during request decoding rather than validate and persist them.
1 open issue
1 file not reviewed
models/certificate_properties.pb.go: Generated file
What changed in this PR
Adds a typed, organization-qualified service-account identity contract to BBS models for companion CAPI and Diego implementations.
Changes:
- Adds optional service-account name and prefix fields to the protobuf schema and regenerates Go bindings.
- Validates both identity fields as lowercase RFC 1123 labels of 3–63 characters, while allowing account-free certificate properties.
- Preserves certificate properties during desired-LRP assembly and adds round-trip, validation, and identity-preservation tests.
| File | Description |
|---|---|
models/task.go |
Validates certificate properties in task definitions. |
models/desired_lrp.go |
Validates identity labels and preserves certificate properties during LRP assembly. |
models/certificate_properties.proto |
Defines the optional service-account identity message. |
models/certificate_properties.pb.go |
Adds generated bindings and serialization for the identity fields. |
models/certificate_properties_test.go |
Covers serialization, validation boundaries, account-free inputs, and identity preservation. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Community RFC draft: cloudfoundry/community#1645.
Authoritative BBS contract for org-owned service accounts with qualified identities, consumed by companion CAPI and Diego implementations.
CertificateProperties.service_accountat protobuf field 2, withServiceAccount.nameat field 1 andServiceAccount.prefixat field 2; retain existing organizational-unit field 1.DesiredLRP.AddRunInfowhen assembling stored desired LRPs; without this, the identity is dropped before rep sees it.This is a platform-owned launch identity contract. CAPI owns org-scoped account lifecycle and explicit same-org space entitlements; Diego derives
<name>.<prefix>.svc.identityand protects the reserved namespace. Only the final qualified identity model is supported.Verification and history
Committed TDD cycles:
cab068e→ GREEN1b8b954.680b730→ GREENbd154ac.1a660ab→ GREEN869b065.3797482→ GREENe2b3a2c.105b5b6→ GREENf974b85.29fc9bb→ GREEN7fc64d1.Focused contract tests and full models regressions passed again on 2026-11-19 after requiring the prefix. Changed Go files are gofmt-clean and
git diff --checkpasses. The schema/generated bindings are unchanged by this validation correction. Diego dependency alignment atfbf2a7ffcverifies LRP/task rejection and qualified wire-to-certificate flow in both vendored and module mode. Earlier live evidence predates this correction; integrated live revalidation remains follow-up work.Compatibility and draft dependency
Optional protobuf additions preserve account-free wire compatibility, but old components may discard unknown fields. Automatic capability negotiation is not implemented; the companion CAPI/Diego operator gates require all participating components to be upgraded before launching account-bound workloads.
Companion Diego at
fbf2a7ffcpinscode.cloudfoundry.org/bbs/modelstov1.15.1-0.20261119082436-7fc64d1d37a1, using an explicit replacement by the same published version ofgithub.com/rkoster/bbs/modelswith committed checksums. Remove the fork replacement/select the upstream module version after merge and publication. No tags/releases are created by this draft.Companion drafts: cloud_controller_ng #5520, capi-release #702, Diego #1216, CLI #3875. This contract is experimental and does not itself implement UAA token policy or route authorization.