Skip to content

feat: add Go UDS controller and native admission policies - #3

Closed
jeff-mccoy wants to merge 16 commits into
mainfrom
codex/native-controller-admission
Closed

jeff-mccoy wants to merge 16 commits into
mainfrom
codex/native-controller-admission

Conversation

@jeff-mccoy

@jeff-mccoy jeff-mccoy commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Review continues in upstream #3190. This superseded fork staging PR is closed; its branch and validation history are preserved.


Add an opt-in Go controller and Kubernetes-native admission profile for UDS Core. The controller reconciles the existing Package/ClusterConfig APIs and retains Java Keycloak, while Kubernetes policies handle object-local admission rules and Go keeps cluster-dependent validation, topology, and JavaScript-compatible exemption behavior.

The supported deployment owns the complete Package lifecycle. Stop and drain the Pepr watcher before starting Go; retain Pepr admission until complete Go registration succeeds. Startup rejects partial phase ownership and an implicit admission-only mode because status and finalizers have one owner. Standard Core package selection continues to use Pepr.

The profile requires Kubernetes 1.37+ and the fixed uds-system/uds-controller identity. Broad Go callbacks remain the default. Protected parameter revision checks, automatic snapshot repair, per-object ownership/version guards, and shared serving trust preserve admission and cleanup boundaries. Lease loss cancels writers; this does not claim distributed fencing of already-accepted API writes.

The implementation follows Core 1.16 schema and validation, creates confidential Java Keycloak probe clients, and reloads consumers when bootstrap trust is first published. CLIENT_SECRET is the default; assertion modes require explicit selection. Go 1.27.3 and patched HTTP/text dependencies are required, and CI checks the module, generation, admission contracts, and production vulnerability reachability.

Validation:

  • 1,840 Go race-tested cases/subtests across 23 packages, vet, deterministic regeneration of 76 API/client files, 1,117 original Pepr unit tests, 120 Keycloak chart tests, and broad/narrow render contracts pass.
  • Production entrypoint and matching symbol-aware audit scans report no reachable vulnerable functions. The audit and release executable sections match; stripped-binary module fallback is not presented as symbol reachability.
  • A task-owned K3s 1.37.1 cluster with signed Core 1.16 inputs, Java Keycloak 26.8.1, real Core addons, and configured CA trust passed all 26 API files: 156 tests passed and two original conditional skips remain. All 31 browser cases completed; one existing classification-banner navigation race used its configured retry.
  • Actual admission, exemption revocation, Package lifecycle, two-replica leader replacement, and serving-CA rotation passed. The rotation run admitted 157 requests without failure and verified each replica's new certificate. These receipts identify their exact earlier runtime revisions.
  • The final ownership/reload revision passed real startup and first-publication smoke checks: an existing consumer restarted and read the new configuration. Both unchanged public-versus-empty CA tests passed against Google HTTPS, with exact CA restoration and fixture removal.

The complete API/browser run used 330ab7f; final targeted startup/reload and trust proof used 514d66c. Earlier failed fixtures and an independent K3s SQLite restart are retained separately. Two custom 90-second trust-preparation attempts exceeded that setup budget during global reconciliation; the unchanged 30-second source assertions subsequently passed using the converged original fixture. This is functional validation, not a new performance or sizing claim. Java SIGNED_JWT compatibility and production migration remain separate gates.

CI setup: this proposal uses a repository-owned branch so the existing private-registry login steps can receive their normal credentials. The K0s compatibility table now matches the configured 1.37 test version; the actual version-consistency check passes. Runtime code is unchanged from the previously validated revision. Replaces #3187.

Upstream review: #3190.

Co-Authored-By: Ark <ark@defenseunicorns.com>
@jeff-mccoy jeff-mccoy changed the title feat: add native admission and Go lifecycle controller feat: add Go UDS controller and native admission policies Oct 6, 2026
@jeff-mccoy
jeff-mccoy changed the base branch from codex/core-v1.14.0-baseline to main October 31, 2026 11:13
The current FIPS image declares user 65532, and its Quarkus application is accessible only to the image owner and group. UID 1000 causes AccessDeniedException during startup. Match the runtime UID, GID and volume group while preserving the non-root and capability restrictions. Add rendered-chart coverage using the actual Unicorn values.
The read-only diagnostic confirmed image user 65532 and Quarkus application ownership 65532:65532 with mode 0770. The runtime values and rendered regression now cover the correction; remove the one-off image export and filesystem scan.
The image UID changed from 1000 to 65532. Fresh installs succeed with the corrected runtime identity, but upgraded Keycloak cannot rewrite the existing 1000-owned truststore and H2 data. Enable the existing upgrade-only permission migration for Unicorn and derive its target UID/GID from the runtime security context instead of hard-coding 1000. Preserve the registry1 identity and the migration container capability restrictions.
@jeff-mccoy jeff-mccoy closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant