Yster
Yster

Reputation: 3305

Spring Security SAML IdP Metadata Certificate and Signature

I have looked at many questions including https://stackoverflow.com/a/25384924/1317559. I have the IdP metadata and certificate, but can't seem to get Spring so see it.

I enabled debugging log and this is what I get:

Upvotes: 2

Views: 12983

Answers (3)

Thomas
Thomas

Reputation: 1149

Also worth noting: Don't change the signed file - happened to me when I reformatted the ADFS generated one-liner. Obviously changes the file's signature.

Upvotes: 1

Yster
Yster

Reputation: 3305

This problem was fixed. There were many problems in fact. I am using the Spring SAML sample application:

  • Need to add the public certificate (the first one after the signature, in the idp metadata) to the samlKeystore.jks under Other sources, security.
  • The password is nalle123 .
  • Don't put anything in the securityContext.xml file.

Upvotes: 0

The Spring SAML manual describes metadata trust verification in chapter 7.2.4. One option is to disable the trust check, or manually remove the signature XML from metadata. Just like you found out, the certificate to import to samlKeystore.jks is the one used to produce the metadata signature, not the signing/encryption certificates for specific SP or IDP entities.

Upvotes: 5

Related Questions