Ziptility / RxDBDotNet

RxDBDotNet is a .NET library that implements the RxDB replication protocol, enabling real-time data synchronization between RxDB clients and .NET servers using GraphQL and Hot Chocolate. It extends the standard RxDB replication protocol with .NET-specific enhancements.
MIT License
4 stars 0 forks source link

Add support for OIDC-configured JWT authentication in GraphQL subscriptions #74

Closed rbeauchamp closed 1 month ago

rbeauchamp commented 1 month ago

Description

Our GraphQL subscription authentication doesn't support OpenID Connect (OIDC) configuration for JWT validation. This limits the flexibility for users who rely on OIDC providers for authentication, especially in scenarios where signing keys may be rotated or fetched dynamically.

Proposed Solution

Implement support for OIDC configuration in our WebSocketJwtAuthInterceptor. This should allow for dynamic retrieval and use of JWT validation parameters, including signing keys, from an OIDC discovery endpoint.

Implementation Details

  1. Update WebSocketJwtAuthInterceptor to check for and use OIDC configuration when available.
  2. If OIDC configuration is present, retrieve signing keys dynamically before token validation.
  3. Ensure this process is efficient and doesn't introduce significant latency in the authentication process.
  4. Update documentation to reflect this new capability.

Testing

User Impact

This enhancement will allow users to integrate our library more easily with OIDC-compliant identity providers, improving flexibility and security in authentication setups.

Acceptance Criteria

Additional Notes

This change should be backwards compatible with existing setups that don't use OIDC configuration.

linear[bot] commented 1 month ago

ENG-2805 Add support for OIDC-configured JWT authentication in GraphQL subscriptions