I am new to this all SSO thing and I am using grails-plugin to integrate multiple IDP in my application. For single IDP it works fine but when I try to add more than one IDP it gives me error like
Servlet.service() for servlet [default] in context with path [] threw exception [org.opensaml.saml2.metadata.provider.MetadataProviderException: Metadata for entity <entityID> and role {urn:oasis:names:tc:SAML:2.0:metadata}IDPSSODescriptor wasn't found] with root cause
Message: Metadata for entity <entityID> and role {urn:oasis:names:tc:SAML:2.0:metadata}IDPSSODescriptor wasn't found
It doesn't matter which IDP I use, only the last entry works and for rest of them it gives me the same error.
It seems it takes the sp alias and save the last entry for it and serve for that.
Also, in logs I get Index for AssertionConsumerService not specified, returning default
if it is of any help.
I know it takes the correct idp as it shows in the logs context.SAMLContextProviderImpl - Using user specified IDP <entityID> from request
Please help I am stuck on this for long
Solved it, I was using mulitple idp files but all idp files should be in a single file and should be under EntitiesDescriptor root tag. Missed that part.