ulisesbocchio / spring-boot-security-saml

spring-security-saml integration with Spring Boot
MIT License
158 stars 73 forks source link

Context path root doesn't start SSO login #53

Closed synertech closed 6 years ago

synertech commented 6 years ago

For a some reason when I go to my context root page (e.g. http://localhost:8080) Spring Security doesn't redirect to SSO login page, but if I put anything after that (e.g. http://localhost:8080/anything) the authentication process start. How to solve this situation?

ulisesbocchio commented 6 years ago

Most likely / is not protected. You would have to add / to the protected urls through the security configurer

ulisesbocchio commented 6 years ago

this is caused by default property value:

saml.sso.logout.default-target-url = /

you can change it either by property or dsl:

serviceProvider
  .logout()
  .defaultTargetURL("/")

This property specifies where you land after a successful logout. The plugin automatically assumes you need that path open because you need to land there while you're not logged in.