-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(auth): add grant type and acr values to OIDC configs #10798
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ public SsoProtocol protocol() { | |
return SsoProtocol.OIDC; | ||
} | ||
|
||
private Client<OidcCredentials> createPac4jClient() { | ||
private Client<OidcCredentials, OidcProfile> createPac4jClient() { | ||
final OidcConfiguration oidcConfiguration = new OidcConfiguration(); | ||
oidcConfiguration.setClientId(_oidcConfigs.getClientId()); | ||
oidcConfiguration.setSecret(_oidcConfigs.getClientSecret()); | ||
|
@@ -75,6 +75,7 @@ private Client<OidcCredentials> createPac4jClient() { | |
oidcConfiguration.setPreferredJwsAlgorithm(preferred); | ||
}); | ||
|
||
oidcConfiguration.setCustomParams(ImmutableMap.of("grant_type", _oidcConfigs.getGrantType(), "acr_values", _oidcConfigs.getAcrValues())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tip Codebase Verification Ensure proper handling of custom parameters in OIDC configuration. The addition of
Analysis chainEnsure proper handling of custom parameters in OIDC configuration. The addition of Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify that the provided grant_type and acr_values are validated.
# Test: Search for validation logic related to grant_type and acr_values.
rg --type java "(validate|check).*(grantType|acrValues)" datahub-frontend/app/auth/sso/oidc/
Length of output: 94 Script: #!/bin/bash
# Description: Verify the provided grant_type and acr_values are validated.
# Search for any validation logic related to _oidcConfigs.
rg --type java "(validate|check).*(oidcConfigs|_oidcConfigs)" datahub-frontend/
# Search for validation logic within OIDC-related classes and files.
rg --type java "(validate|check)" datahub-frontend/app/auth/sso/oidc/
Length of output: 663 Script: #!/bin/bash
# Description: Extract and examine validation logic within CustomOidcAuthenticator.java and OidcCallbackLogic.java.
# Extract the validate method from CustomOidcAuthenticator.java
ast-grep --lang java --pattern 'public void validate($_, $_) { $$$ }' datahub-frontend/app/auth/sso/oidc/custom/CustomOidcAuthenticator.java
# Extract the validation-related code from OidcCallbackLogic.java
rg --type java 'validate' datahub-frontend/app/auth/sso/oidc/OidcCallbackLogic.java
Length of output: 323 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are we overriding the previous customParams set on line 69? |
||
final CustomOidcClient oidcClient = new CustomOidcClient(oidcConfiguration); | ||
oidcClient.setName(OIDC_CLIENT_NAME); | ||
oidcClient.setCallbackUrl( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is DEFAULT_OIDC_GRANT_TYPE defined?