Skip to content

Conversation

@fhanik
Copy link
Contributor

@fhanik fhanik commented Sep 8, 2025

We'd like a bit more public visibility into the federation of providers in the /info endpoint. This PR displays an JSON object named providers with three attributes (name, origin, type) on the /info endpoint when JSON is requested.

You can today, go to the /login page, and extract origins for both SAML and OIDC providers, so we do believe it is ok to display this information.

To be discussed September 11, 2025 in UAA meeting


if (jsonResponse && request.getRequestURI().endsWith("/info")) {
List<Map<String, String>> infoIdentityProviders = new java.util.ArrayList<>();
providerProvisioning.retrieveAll(true, IdentityZoneHolder.get().getId())
Copy link
Member

Choose a reason for hiding this comment

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

We have tweaked this endpoint the last years not to retrrieve always all IdP because we (SAP) have many IdPs in one zone and with cf login there is the situation, that /info is called before the login and with that we had DB issues

@torsten-sap correct or is my assumption no longer valid ?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds like a property to explicit enable this feature is needed, with the default being set to false

Copy link
Member

Choose a reason for hiding this comment

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

problem is that we had many changes in this area, some because to fix DB performance, and later some to repair some regressions, we should discuss in meeting

if (jsonResponse && request.getRequestURI().endsWith("/info")) {
List<Map<String, String>> infoIdentityProviders = new java.util.ArrayList<>();
providerProvisioning.retrieveAll(true, IdentityZoneHolder.get().getId())
.forEach(provider -> {
Copy link
Member

Choose a reason for hiding this comment

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

I think we have to filter , because SAML and OAUTH use a property to determine if visible or not

Copy link
Contributor Author

@fhanik fhanik Sep 16, 2025

Choose a reason for hiding this comment

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

Thetrue in retrieveAll(true is that property, isn't it? It means active providers only.

Copy link
Member

Choose a reason for hiding this comment

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

not only acitve, but only provider with either

  • showSamlLink
  • showLinkText

@strehle strehle requested a review from torsten-sap September 15, 2025 07:34
@fhanik fhanik marked this pull request as draft September 18, 2025 14:19
@fhanik fhanik force-pushed the pr/info-endpoint-providers branch from 16ab7ce to c257135 Compare September 23, 2025 17:52
@fhanik
Copy link
Contributor Author

fhanik commented Oct 7, 2025

I am abandoning this effort. We're going a different route for the use case. No need to add more complexity to /login and /info

@fhanik fhanik closed this Oct 7, 2025
@fhanik fhanik deleted the pr/info-endpoint-providers branch October 13, 2025 16:21
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.

2 participants