Skip to content

[Improvement-284][auth] Add generalized OIDC authentication with multi-provider support #17119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

dhanushakkari00
Copy link

@dhanushakkari00 dhanushakkari00 commented Apr 8, 2025

GSoC 2025

  • Introduced pluggable OIDC support that integrates with multiple Identity Providers (IdPs) such as Keycloak and Dex for generalized SSO.
  • Implemented GenericOidcAuthenticator to dynamically manage authentication for any OIDC-compliant provider.
  • Added utility classes:
    OidcService: Handles token exchange and user session handling.
    OidcUserInfo: Extracts user info from ID token.
  • Created configuration classes:
    OidcConfiguration
    OidcAuthenticationConfig These allow dynamic provider setup via application.yaml.
  • Modified LoginController.java to:
    Redirect to the appropriate OIDC provider based on request.
    Handle callback, extract user info, create session, and redirect back with session ID.

…ovider configuration

- Implemented pluggable OIDC support with Keycloak and Dex compatibility
- Added GenericOidcAuthenticator and OidcService for dynamic OIDC login
- Introduced config-driven provider support via �pplication.yaml
- Extended LoginController to handle OIDC redirects and session creation
- Enables scalable authentication using OIDC-compliant providers beyond Casdoor

Related to: GSOC-284
Copy link

boring-cyborg bot commented Apr 8, 2025

Thanks for opening this pull request! Please check out our contributing guidelines. (https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)

@dhanushakkari00 dhanushakkari00 changed the title feat(auth): Add generalized OIDC authentication support with multi-pr… [Improvement][Auth] Add generalized OIDC authentication support with multi-provider configuration Apr 8, 2025
@dhanushakkari00 dhanushakkari00 changed the title [Improvement][Auth] Add generalized OIDC authentication support with multi-provider configuration [Improvement][Auth][GSOC-284] Add generalized OIDC authentication support with multi-provider configuration Apr 8, 2025
@dhanushakkari00 dhanushakkari00 changed the title [Improvement][Auth][GSOC-284] Add generalized OIDC authentication support with multi-provider configuration [Improvement-GSOC-284][auth] Add generalized OIDC authentication support with multi-provider configuration Apr 8, 2025
@dhanushakkari00 dhanushakkari00 changed the title [Improvement-GSOC-284][auth] Add generalized OIDC authentication support with multi-provider configuration [Improvement-284][auth] Add generalized OIDC authentication with multi-provider support Apr 8, 2025
@SneakyThrows
@Operation(summary = "redirectToOidc", description = "REDIRECT_TO_OIDC_LOGIN")
@GetMapping("redirect/login/oidc")
public void loginByOidc(@RequestParam String code, @RequestParam String provider,

Check failure

Code scanning / CodeQL

HTTP request type unprotected from CSRF High

Potential CSRF vulnerability due to using an HTTP request type which is not default-protected from CSRF for an apparent
state-changing action
.
@Operation(summary = "redirectToOidc", description = "REDIRECT_TO_OIDC_LOGIN")
@GetMapping("redirect/login/oidc")
public void loginByOidc(@RequestParam String code, @RequestParam String provider,
HttpServletRequest request, HttpServletResponse response) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'request' is never used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant