Repository navigation
Conversation
Add lib/oidcfederation: operator-configured OIDC issuers and federation rules, a verifier for the identity tokens they sign, and per-provider matchers for GitHub Actions, AWS, Google Cloud, Microsoft Entra, Kubernetes and custom OIDC issuers. The server reads an optional oidc config block (or an OIDC JSON environment override), rejects unknown keys inside it, and fails to start when it is invalid. Nothing consumes the rules yet.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
sjmiller609
reviewed
Nov 23, 2026
sjmiller609
left a comment
Collaborator
There was a problem hiding this comment.
wondering about a design decision to issue hypeman tokens, versus direct auth.
what if we use #601 to verify the workload’s OIDC token directly and apply the rule’s permissions on each request? /oauth/token makes clients depend on Hypeman issuing a token, so it needs a secret that can issue credentials. In theory we could be using private / public keys so Hypeman could authenticate keys without the secret, and the design of issuing the Hypeman key complicates moving away from shared jwt_secret to a model where hosts hold only public keys and can verify API tokens but can’t mint them.
WDYT
This branch has not been deployed
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
First of two stacked pull requests that let a workload trade an OIDC identity token for a short-lived Hypeman API token, so no long-lived token has to be stored with it. This one adds the trust model and the verifier. #602 adds the endpoint that uses them.
lib/oidcfederation: operator-configured issuers (who signs) and federation rules (which workload of an issuer is accepted, and whichpermissionsit receives), plus a verifier for the identity tokens those issuers sign.oidcblock, orOIDCin the environment as one JSON document that replaces it. Unknown keys inside the block are rejected, and an invalid block stops the server from starting, like an emptyjwt_verification_secretsentry does today.Behavior
Nothing consumes the rules yet. The only change on its own is that a server with an invalid
oidcblock refuses to start; without the block nothing changes.Verifier
issmust equal the configured issuer URL before any key is fetched. Key locations come from configuration only.kid. Keys published for another purpose (encryption) are skipped.aud, requiredexpandiat, a maximum incoming lifetime, and a token ID for single-use issuers.go-jose/v4becomes a direct dependency at v4.1.5, which rejects a low-order Ed25519 key that v4.1.4 accepts.Notes for review
*is rejected, so a federated token can never read as a full-access token.match.repository: a repository name is pinned with a/repositoryclaim condition, next to the mandatory numeric IDs.Testing
go test ./lib/oidcfederation/ ./cmd/api/config/(unit tests for every preset, the verifier and key cache, key fetching, and config loading from YAML and the environment).go vetandgofmtclean on the touched packages.make testsuite was not run locally (it needs KVM and the hypervisor binaries); CI runs it.Reviewed with sol-loop: 3 rounds with openai-codex/gpt-6.2-sol on extra-high reasoning. Sol verdict: approved.