Closed evgusha80 closed 1 year ago
Hi, @evgusha80.
If you take a look at the class that you mentioned, you can see that it includes the required Content-Security-Policy
meta tag in the generated HTML. It might be possible that the tag is being replaced in your production environment? The hash even matches the hash that the error message provides.
Hello @marcusdacoregio , Thanks for the quick reply and pointing to the root cause. I've applied the suggestion in our production and the fix is working fine You can resolve the ticket. Thanks, Evgeny
Describe the bug When clickjacking prevention is enabled, it is impossible to redirect SAML2 request to IdP.
To Reproduce
After investigation it looks like the issue is related to metadata returned from Okta: "
"
and the issue is in org.springframework.security.saml2.provider.service.web.Saml2WebSsoAuthenticationRequestFilter that produces this page as part of this method: private String createSamlPostRequestFormData(Saml2PostAuthenticationRequest authenticationRequest)
Expected behavior Redirect to IdP login page should happen without issues described above.
Sample I cant provide our enterprise application but the issue can be also reproduced in demo application here: https://github.com/oktadev/okta-spring-boot-saml-example if changing the domain and enable the clickjacking prevention