Skip to content

Support OIDC in Aerie-UI by adding JWKS Support.#131

Open
pranav-super wants to merge 4 commits intodevelopfrom
feature/oidc-support
Open

Support OIDC in Aerie-UI by adding JWKS Support.#131
pranav-super wants to merge 4 commits intodevelopfrom
feature/oidc-support

Conversation

@pranav-super
Copy link
Copy Markdown
Contributor

This PR compliments this Aerie-UI PR, and introduces support in Gateway for JWKS decoding. Since the OIDC flow in Aerie can call the session endpoint in the gateway, which verifies the token, support for JWKS is crucial.

Comment thread src/packages/auth/functions.ts Fixed
Comment thread src/packages/auth/functions.ts Fixed
Comment thread src/packages/auth/functions.ts Fixed
@pranav-super pranav-super force-pushed the feature/oidc-support branch 2 times, most recently from b70a375 to 1a8de26 Compare August 15, 2025 19:30
@sonarqubecloud
Copy link
Copy Markdown

@jmorton jmorton force-pushed the feature/oidc-support branch from 1a8de26 to ec62a16 Compare October 10, 2025 23:26
jmorton and others added 4 commits December 8, 2025 20:14
Add support for verifying JWTs using JWKS (JSON Web Key Set) endpoints,
enabling integration with OIDC providers like Keycloak.

- Add jwks-rsa dependency for fetching and caching JWKS
- Update JWT verification to support both static secrets and JWKS URLs
- Update JWT expiration type to work with jwt.SignOptions

Co-authored-by: Pranav Subramanian <pranav.subramanian@nasa.gov>
- Add issuer and audience fields to JwtSecret type
- Validate issuer/audience claims when configured in HASURA_GRAPHQL_JWT_SECRET
- Fix JWKS error handling to properly propagate errors
- Change default JWT algorithm from HS256 to RS256 (matches Aerie UI)
- Use JWT_ALGORITHMS env var instead of hardcoded algorithm list
- Update .env.template with OIDC configuration examples

Co-authored-by: Pranav Subramanian <pranav.subramanian@nasa.gov>
Tests cover:
- Authorization header parsing (Bearer token extraction, error cases)
- RS256 token verification with static key
- Issuer validation (rejection on mismatch, acceptance when correct)
- Audience validation (single value and array)
- Combined issuer + audience validation
- Skipped validation when not configured (backward compatibility)
- Expired token handling
- HS256 token verification

Co-authored-by: Pranav Subramanian <pranav.subramanian@nasa.gov>
Adds environment variables to configure JWT claim paths, allowing
deployments to use custom namespaces and claim names that match their
OIDC provider's token structure:

- JWT_CLAIMS_NAMESPACE: The namespace key in the JWT (default: https://hasura.io/jwt/claims)
- JWT_CLAIMS_USER_ID: Claim name for user ID (default: x-hasura-user-id)
- JWT_CLAIMS_ALLOWED_ROLES: Claim name for allowed roles (default: x-hasura-allowed-roles)
- JWT_CLAIMS_DEFAULT_ROLE: Claim name for default role (default: x-hasura-default-role)

This matches the claim path configurability in Aerie UI, enabling
consistent configuration across both applications when using custom
OIDC providers like Keycloak.

Co-Authored-By: Pranav Subramanian <pranav@example.com>
@jmorton jmorton force-pushed the feature/oidc-support branch from ec62a16 to 19b633c Compare December 9, 2025 03:09
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.

3 participants