Repository navigation
feat: shared API helpers (ProbeValidators, ExtractorConfig.Check, APIMiddlewares) - #148
Merged
Merged
Conversation
…d validators ProbeValidators fetches each distinct issuer's discovery document and JWKS and requires at least one key, returning every failure joined. It is for a readiness check, and passes when no validator fetches keys. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS4MAvnUSKyK9WP4pSz5Gg
…uthenticates Check reports a missing or conflicting authentication setup, an allow-unauthenticated without accept-unauthenticated-risk, the inert acknowledgement, and debug claim-role mappings without enable-debug. AcceptUnauthenticatedRisk moves into ExtractorConfig beside AllowUnauthenticated, and LogUnauthenticated words the startup risk once. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS4MAvnUSKyK9WP4pSz5Gg
APIMiddlewares returns bearer token validation followed by principal extraction, leaving out validation when there are no validators. Callers add anything that must run before authentication or needs the principal around it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS4MAvnUSKyK9WP4pSz5Gg
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
oidc.ProbeValidatorsandKeyFetchingIssuers: check that every identity provider behind the validators answers discovery and serves a key, for a readiness check.claimrolemapping.ExtractorConfig.CheckandLogUnauthenticated: report a missing or conflicting authentication setup,allow-unauthenticatedwithoutaccept-unauthenticated-risk, the inert acknowledgement, and debug mappings withoutenable-debug.AcceptUnauthenticatedRiskmoves intoExtractorConfig; a service embedding it squashed keeps its YAML key and field access.server.APIMiddlewares: bearer token validation then principal extraction. Rate limiting and header checks stay with the caller.Part of connect-control's shared-helpers plan (step 4, doc/proposals/shared-server-helpers.md). It uses dioad/config's
configcheck.Collector, which is already released.Test plan
go vet ./...,go test -racefor oidc, claimrolemapping, http/...🤖 Generated with Claude Code
https://claude.ai/code/session_01SS4MAvnUSKyK9WP4pSz5Gg