feat: add OIDC authentication support for Go services#170
Draft
boehlke wants to merge 5 commits intoOpenSlides:mainfrom
Draft
feat: add OIDC authentication support for Go services#170boehlke wants to merge 5 commits intoOpenSlides:mainfrom
boehlke wants to merge 5 commits intoOpenSlides:mainfrom
Conversation
b89eb6a to
9224a36
Compare
This was referenced Feb 19, 2026
Closed
Member
|
I made changes but could not push them into your PR. I pushed them here instead: https://github.com/OpenSlides/openslides-go/tree/feature/keycloak-oidc |
fb92ee2 to
0e3dd68
Compare
0e3dd68 to
03c1e1d
Compare
- Add OIDCValidator with JWKS discovery and token validation - Add UserLookup to resolve keycloak_id to OpenSlides user ID via PostgreSQL - Extend auth.New() to accept optional *pgxpool.Pool for OIDC user resolution - Support OIDC environment variables (OIDC_ENABLED, OIDC_ISSUER_URL, etc.) - Include unit tests for OIDC validation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
NewOIDCValidator now takes 3 args (issuerURL, internalIssuerURL, clientID). Update all test call sites to pass issuerURL as both external and internal URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
03c1e1d to
6b339dd
Compare
6b339dd to
6a2c3e9
Compare
…NTERNAL_ISSUER_URL
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
OIDCValidatorwith JWKS discovery and token validation for Keycloak bearer tokensUserLookupto resolvekeycloak_idto OpenSlides user ID via PostgreSQLauth.New()to accept optional*pgxpool.Poolfor OIDC user resolution (backward-compatible variadic parameter)OIDC_ENABLED,OIDC_ISSUER_URL, etc.)Context
This is the foundational library change for adding Keycloak OIDC authentication to all Go-based OpenSlides services. The
auth.New()signature change is backward-compatible (variadic pool parameter), so existing callers continue to work without modification.Related PRs (part of Keycloak OIDC integration):
Test plan
make dev oidc🤖 Generated with Claude Code