oktadev / okta-spring-boot-saml-example

Spring Boot, SAML, and Okta
https://developer.okta.com/blog/2022/08/05/spring-boot-saml
Apache License 2.0
77 stars 57 forks source link

SAMLRequest without service provider signing certificate #11

Closed rameshdamas closed 4 years ago

rameshdamas commented 4 years ago

Hi, I tried this example, It's works with Okta. Now I'm trying to send AuthnRequest without service provider signing certificate. For this I modified SecurityConfiguration.java like below: means removed serviceprovider keystore. @Override protected void configure(final HttpSecurity http) throws Exception { http.authorizeRequests().antMatchers("/saml*").permitAll().anyRequest().authenticated().and().apply(saml()) .serviceProvider().entityId("spring-boot-security-saml").and().identityProvider() .metadataFilePath(this.metadataUrl);}

After this getting below error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed;

Is this any issue? Could you please suggest how to configure SAMLRequest without SP signing certificate

rameshdamas commented 4 years ago

I want to generate SAMLRequest without Signature like below: `<?xml version="1.0" encoding="UTF-8"?> <saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="https://localhost:8443/saml/SSO" Destination="" ForceAuthn="false" ID="aca3c6e2g18igjc32iea71j731g3d5" IsPassive="false" IssueInstant="2019-10-09T06:12:08.166Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0">

https://localhost:8443/saml/metadata ` How to disable Signature while generating SAMLRequest ?
mraible commented 4 years ago

I don't know how to do what you're asking for. Since you said this example works with Okta, I'm closing it. Please ask your questions on Stack Overflow with an "okta" tag. Hopefully, that will get more eyes on it and someone with more knowledge than me can answer your question.