How to avoid the "Select an Identity Provider" page when application.yml has only one IdP?

188 Views Asked by At

Is there a way to avoid the "Select an Identity Provider" page when application.yml has only one IdP entry thus? ...

        providers:
          - alias: spring-security-saml-idp
            metadata: http://localhost:7071/sample-idp/saml/idp/metadata
            linktext: Spring Security SAML IDP on port 7071
            name-id: urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
            assertion-consumer-service-index: 0

Thanks

Naga Vijayapuram

1

There are 1 best solutions below

0
On

It would seem that you are out of luck: the SamlAuthenticationRequestFilter has built in the selection mechanism (actually expects tha parameter idp in the request) . If you want to forward to default IDP, I believe you either need to sublcass said filter or make your own filter that does the info injection.

The result could be something like this

(user accesses page) - (new filter that checks if only one idp is configured and forwards) - (SamlAuthenticationRequestFilter)