feat(auth): add option to disable authentication for external OAuth integration#76
Open
thenilayagarwal wants to merge 1 commit intorisingwavelabs:mainfrom
Open
Conversation
Add a new configuration option `auth.disable` that allows disabling the built-in JWT authentication. This is useful when: 1. Using an external authentication proxy (e.g., OAuth2 proxy, Pomerium, or Traefik ForwardAuth) to handle authentication 2. Running in a trusted internal environment where authentication is managed at the network level 3. Development and testing scenarios When authentication is disabled: - All API endpoints are accessible without JWT tokens - A default OrgID (1) is set in the request context to ensure downstream handlers continue to function correctly Configuration: - YAML: `auth.disable: true` - Environment variable: `RCONSOLE_AUTH_DISABLE=true` This addresses the challenge of integrating with external OAuth/OIDC providers, as the current dual-authentication approach (both external proxy and internal JWT) creates friction and complexity. Users who want to use OAuth can now disable the internal auth and rely entirely on their external authentication proxy. WARNING: This option should only be used in trusted environments or when running behind a properly configured authentication proxy.
Contributor
|
Thanks for the PR! I’m trying to understand the intended usage here. Even with backend auth disabled, the frontend still redirects to /login when there’s no refresh token in local storage, so access would still be blocked. Could you describe how you’re using this in your setup? |
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
This PR adds a configuration option to disable the built-in JWT authentication in risingwave-console. This addresses the need for integrating with external OAuth/OIDC providers.
The Problem: Dual Authentication Friction
When deploying risingwave-console behind an external authentication proxy (such as OAuth2 Proxy, Pomerium, Traefik ForwardAuth, or cloud IAP), users face a dual-authentication problem:
This creates several issues:
The Solution
Add an
auth.disableconfiguration option that:Configuration
YAML config:
Environment variable:
Example: Using with OAuth2 Proxy
Security Considerations
Changes
AuthConfigstruct withDisablefield topkg/config/config.goValidatorinpkg/controller/validator.goto check disable flag and skip authdocs/config.mdTest Plan
go build ./...)go test ./pkg/...)RCONSOLE_AUTH_DISABLE=true