-
Notifications
You must be signed in to change notification settings - Fork 6k
Saml SSO configuration yaml file referenced in the docs not working properly with newer versions of spring boot #12810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You're right that it's expected to work with Can you share a bit more about the error, do you possible have a sample we could run? Did it fail at server startup or at runtime? |
Also looking spring-projects/spring-boot#30128, some new properties are now handled via boot's auto-config, but those added in that issue don't check deprecated properties. I also saw a simple boot app(2.7.x) not to fail at startup when using Also boot 3.0.x did remove deprecations so |
Hi @jvalkeal , Along with my security config file as:
In the logs i get: My pom.xml:
|
If you use:
you should get exception (as it happens with assertingparty):
I think these all goes back to boot's handling of that deprecation, for example in this check empty list is returned, not null so it tries to use one from Other issue is below checks where deprecation is not even checked: |
I've opened spring-projects/spring-boot#34525 to fix the problem with Boot ignoring the certificate location. |
We'll use this issue to just update docs. |
Should i still update the docs to reflect assertingparty instead of identityprovider? |
@Anubhav-2000 If you want to create a PR, then it should be done against branch |
Spring Boot 2.7 renamed spring.security.saml2.relyingparty.registration.*.identityprovider.* to spring.security.saml2.relyingparty.registration.*.assertingparty.*. Closes spring-projectsgh-12810.
Spring Boot 2.7 renamed spring.security.saml2.relyingparty.registration.*.identityprovider.* to spring.security.saml2.relyingparty.registration.*.assertingparty.*. Closes spring-projectsgh-12810. Signed-off-by: Danilo Piazzalunga <[email protected]>
I stumbled onto the same issue, and I updated the documentation (against |
Spring Boot 2.7 renamed spring.security.saml2.relyingparty.registration.*.identityprovider.* to spring.security.saml2.relyingparty.registration.*.assertingparty.*. Closes spring-projectsgh-12810. Signed-off-by: Danilo Piazzalunga <[email protected]>
Spring Boot 2.7 renamed spring.security.saml2.relyingparty.registration.*.identityprovider.* to spring.security.saml2.relyingparty.registration.*.assertingparty.*. Closes spring-projectsgh-12810. Signed-off-by: Danilo Piazzalunga <[email protected]>
I was using the spring security docs and this link as a reference to implement SSO: https://medium.com/digital-software-architecture/spring-boot-spring-security-with-saml-2-83d87df5b470
This seems to work if the spring boot starter parent dependency is version 2.4.2. But fails with version 2.7.2. It gives an error Invalid signature for object [id…]
I messed around with the code a bit and it only worked when i changed the identityprovider tag in the yaml file to assertingparty tag.
So the spring docs says to use this yaml file: https://docs.spring.io/spring-security/reference/servlet/saml2/login/overview.html#saml2-specifying-identity-provider-metadata
But the correct yaml file is:
spring:
security:
saml2:
relyingparty:
registration:
adfs:
assertingparty:
entity-id: https://idp.example.com/issuer
verification.credentials:
- certificate-location: "classpath:idp.crt"
singlesignon.url: https://idp.example.com/issuer/sso
singlesignon.sign-request: false
The text was updated successfully, but these errors were encountered: