Skip to content

feat: add oidc verifier type#23

Open
nickmarden wants to merge 2 commits intomainfrom
feat/oidc-verifier
Open

feat: add oidc verifier type#23
nickmarden wants to merge 2 commits intomainfrom
feat/oidc-verifier

Conversation

@nickmarden
Copy link
Copy Markdown
Contributor

Summary

  • Adds a generic oidc verifier type that validates RS256-signed OIDC JWT bearer tokens (Authorization: Bearer <token>) from any OIDC-compliant identity provider
  • Pure stdlib implementation; no new Go module dependencies
  • Supports OIDC discovery (auto-fetches jwks_uri from {issuer}/.well-known/openid-configuration), standard JWK Set format, and Google X.509 certificate map format
  • Public keys cached for one hour; unknown kid triggers a one-time cache refresh
  • Optional claims map for additional JWT claim validation (e.g. requiring email: chat@system.gserviceaccount.com)
  • Documents Google Chat (project-number and app-url modes) and Azure Event Grid AAD as example use cases in config/example.yaml
  • Migrates .golangci.yml to golangci-lint v2 config format (the linter was failing to load config entirely before this)

Test plan

  • make test passes with 100% coverage on internal/verifier
  • make lint passes (0 issues)
  • make build succeeds
  • Review config/example.yaml OIDC examples for correctness
  • Review docs/PROVIDER_TODO.md — Google Chat moved to Already Implemented

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Docker Images Built

Images are available for testing:

# gatekeeperd
docker pull ghcr.io/tight-line/gatekeeperd:pr-23-1f92834

# gatekeeper-relay
docker pull ghcr.io/tight-line/gatekeeper-relay:pr-23-1f92834

docker-compose.yml

GATEKEEPERD_IMAGE=ghcr.io/tight-line/gatekeeperd:pr-23-1f92834 \
RELAY_IMAGE=ghcr.io/tight-line/gatekeeper-relay:pr-23-1f92834 \
docker-compose --profile relay up

Helm (values override)

image:
  repository: ghcr.io/tight-line/gatekeeperd  # or gatekeeper-relay
  tag: "pr-23-1f92834"

Images expire ~15 days after PR closes.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Infrastructure:
- Upgrade Go to 1.25.6 (fixes stdlib CVEs in net/url, net/mail, crypto/x509)
- Migrate golangci-lint config to v2 format and update CI to use v2
- Add generated coverage files to .gitignore

Pre-existing lint/quality fixes:
- Fix unchecked m.client.Close() in redis_manager.go (errcheck)
- Add shared IP address constants (testips_test.go) with NOSONAR annotations
  to centralize the go:S1313 hotspot review for test fixtures
- Add shared string constants (testconst_test.go) for config tests
- Replace ~400 duplicate string literals in handler_test.go and config_test.go
  with named constants, resolving SonarCloud S1192 code smells
- Reduce cognitive complexity in handler_test.go by extracting test helpers
Adds a new `oidc` verifier type that validates OIDC JWT bearer tokens
by fetching JWKS from the provider's discovery document and verifying
RS256, RS384, RS512, ES256, ES384, and ES512 signatures.
@nickmarden nickmarden force-pushed the feat/oidc-verifier branch from 8786750 to 1f92834 Compare April 2, 2026 14:20
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 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