Repository navigation
Conversation
This was referenced Oct 6, 2026
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.
🔵 Needs a closer look
Security-sensitive identity issuance depends on an unmerged BBS contract and coordinated cross-component rollout, requiring human review while integrated revalidation after the prefix correction and Windows runtime validation remain outstanding.
No open issues 🎉
What changed in this PR
Adds experimental, default-off service-account certificate identities to Diego, carrying qualified account names from BBS through rep into executor-issued instance and container-to-container credentials.
Changes:
- Propagates and validates account names and organization prefixes using the updated BBS contract.
- Issues qualified service-account DNS SANs, preserves launch-time identity during renewal, and rejects reserved-namespace injection.
- Adds Linux and Windows configuration gates, regression coverage, and operator rollout documentation.
| File | Description |
|---|---|
| src/code.cloudfoundry.org/vendor/modules.txt | Records the updated BBS models dependency and fork replacement. |
| src/code.cloudfoundry.org/vendor/code.cloudfoundry.org/bbs/models/task.go | Validates task certificate properties. |
| src/code.cloudfoundry.org/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.go | Validates qualified identities and preserves certificate properties during LRP assembly. |
| src/code.cloudfoundry.org/vendor/code.cloudfoundry.org/bbs/models/certificate_properties.proto | Defines the service-account wire contract. |
| src/code.cloudfoundry.org/vendor/code.cloudfoundry.org/bbs/models/certificate_properties.pb.go | Adds generated service-account serialization support. |
| src/code.cloudfoundry.org/rep/service_account_credentials_test.go | Covers required prefixes and wire-to-certificate propagation. |
| src/code.cloudfoundry.org/rep/conversion_helpers.go | Validates and copies account identities into executor requests. |
| src/code.cloudfoundry.org/rep/conversion_helpers_test.go | Tests identity propagation, validation, and copy isolation. |
| src/code.cloudfoundry.org/go.sum | Adds BBS model dependency checksums. |
| src/code.cloudfoundry.org/go.mod | Pins the qualified-identity BBS contract through a fork replacement. |
| src/code.cloudfoundry.org/executor/service_account_copy_test.go | Tests account identity isolation in container copies. |
| src/code.cloudfoundry.org/executor/resources.go | Defines executor account identities and copies them independently. |
| src/code.cloudfoundry.org/executor/initializer/initializer.go | Wires the feature gate and requires instance-identity support. |
| src/code.cloudfoundry.org/executor/initializer/initializer_test.go | Tests gate configuration and credential prerequisites. |
| src/code.cloudfoundry.org/executor/depot/containerstore/credmanager.go | Issues account SANs, validates inputs, and retains launch identity. |
| src/code.cloudfoundry.org/executor/depot/containerstore/credmanager_test.go | Covers issuance, rejection, renewal, and unbind behavior. |
| spec/rep_windows_template_spec.rb | Tests default-off and enabled Windows configuration. |
| spec/rep_template_spec.rb | Tests default-off and enabled Linux configuration. |
| jobs/rep/templates/rep.json.erb | Renders the Linux feature gate. |
| jobs/rep/spec | Declares the default-off Linux property. |
| jobs/rep_windows/templates/rep.json.erb | Renders the Windows feature gate. |
| jobs/rep_windows/spec | Declares the default-off Windows property. |
| docs/072-service-account-identity.md | Documents the contract, rollout requirements, lifecycle, and dependency provenance. |
Review effort: Balanced
8 tasks
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.
Runtime implementation of org-owned service accounts with qualified identities and explicit same-org space entitlements managed by CAPI.
certificate_properties.service_accountwith name and organization prefix through BBS LRP/task conversion into executor. The BBS runtime contract requires both labels.<name>.<prefix>.svc.identityDNS SAN to instance and C2C credentials while preserving caller GUID/CN/IP/OUs, existing routes, usages, lifetime and independent keys.diego.executor.service_account_identity_enabledfor Linux and Windows rep jobs.Backward compatibility
Experimental opt-in; existing account-free workloads preserve their credential shape. SAN-producing inputs in the reserved
svc.identitynamespace are rejected even without an account. Review this namespace restriction as an intentional compatibility change.Keep the CAPI runtime gate off until every participating BBS/rep/cell supports the contract. Automatic auction/foundation capability negotiation is not implemented, so old components discarding unknown protobuf fields remain a rollout risk. Windows templates/cross-compilation were verified; Windows execution was not.
Verification
History preserves committed RED/GREEN behavior cycles.
f05c613cd→ GREENfbf2a7ffc. Both LRP/task runtime contracts rejected missing prefixes after refresh; qualified wire-to-certificate flow remains valid.8c77dc63a→ GREEN325d9a244. Executor rejects nine missing/malformed prefix inputs at issuance and has no unqualified SAN fallback. All21 focused cases pass, including qualified 3/63-character boundaries and renewal/unbind snapshots. The entire executor/rep regression run passes after this correction, plus go vet, changed-file gofmt and whitespace checks.-mod=modfocusedTestServiceAccounttests pass against the published fork module. Changed Go files are gofmt-clean;git diff --checkpasses. Rep report:/tmp/opencode/diego-bbs-alignment-rep.json(local).Contract and other draft dependencies
Merge dependency: BBS draft #168, source
7fc64d1d37a1bb2f5bcb6619c87ac27f859ea62e, provides required qualified identity validation and the stored-LRPAddRunInfofix.code.cloudfoundry.org/bbs/modelsis pinned tov1.15.1-0.20261119082436-7fc64d1d37a1with an explicit replacement by the same published version ofgithub.com/rkoster/bbs/modelsand committed checksums. Vendor was refreshed viago mod vendor; no vendor/generated files were hand-edited. Fresh focused module-mode resolution/tests pass. Remove the fork replacement/select the upstream version once the BBS change is merged and published.Companion drafts: cloud_controller_ng #5520, capi-release #702, CLI #3875. UAA baseline: cloudfoundry/uaa#4076. Live tokens include
cnf, an explicit deviation from the proposal's bearer profile. Near-expiry lifetime caps, namespace-limited UAA management, timed live renewal and the remaining acceptance matrix are still open.Disabling/unbinding is not immediate certificate revocation. Account authorization/provisioning and staging exclusion are CAPI responsibilities. Current verification is local; prior live evidence predates this dependency refresh and required-prefix issuance correction. Current upstream reconciliation, release/build verification and integrated live revalidation remain readiness work.