Skip to content

Conversation

@adrianhoelzl-sap
Copy link
Contributor

@adrianhoelzl-sap adrianhoelzl-sap commented Jan 22, 2025

(alternative for #3251)

This PR optimizes the login info endpoint so that it does not fetch all OAuth IdPs when a JSON response is requested.

Prior to the optimization, all OAuth IdPs are queried and then used for determining a potential redirect to the corresponding external IdP. However, for JSON responses the redirect is ignored anyway.

The optimization introduces the following changes to the JSON response, which are in our opinion acceptable:

  • showLoginLinks is no longer returned if there is also no SAML IdP with showSamlLink enabled
    • this property is only relevant for the login page and therefore obsolete for the JSON response
    • in the JSON response, only SAML IdPs are part of the idpDefinitions anyway
  • the passcode prompt is no longer removed if there is no SAML/OIDC IdP with showSamlLink/showLinkText in the IdP definitions list
    • password grants with a one-time passcode also work with the UAA user store

The first few commits in this PR are refactorings of the endpoint handler, they don't change any behavior. We advise to go through the PR from commit to commit.

@adrianhoelzl-sap adrianhoelzl-sap force-pushed the login-info-endpoint-optimize-oauth-idps-for-json-response branch from fcc24a6 to e18939e Compare January 23, 2025 08:56
@adrianhoelzl-sap adrianhoelzl-sap marked this pull request as ready for review January 28, 2025 09:56
@adrianhoelzl-sap adrianhoelzl-sap force-pushed the login-info-endpoint-optimize-oauth-idps-for-json-response branch from e18939e to f31a1c6 Compare January 31, 2025 10:16
@strehle strehle self-assigned this Jan 31, 2025
@adrianhoelzl-sap adrianhoelzl-sap requested a review from a team February 6, 2025 17:00
@duanemay
Copy link
Member

duanemay commented Feb 6, 2025

Should #3251 be closed, with this one?

@strehle strehle removed their assignment Feb 12, 2025
Copy link
Member

@strehle strehle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved already... do you need anything from other approvers ?
btw. can you answer question from @duanemay

@strehle strehle requested a review from duanemay February 12, 2025 06:42
@adrianhoelzl-sap adrianhoelzl-sap merged commit d8c10f0 into develop Feb 14, 2025
22 checks passed
@adrianhoelzl-sap adrianhoelzl-sap deleted the login-info-endpoint-optimize-oauth-idps-for-json-response branch February 14, 2025 09:24
@strehle strehle mentioned this pull request Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants