title: How do I configure Spring Security SAML to work with Okta?
body: <p>I'm trying to make <a href="https://github.com/vdenotaris/spring-boot-security-saml-sample" rel="nofollow noreferrer">spring-boot-security-saml-sample</a> application work with Okta. To add Okta as a provider, I've made the following changes to WebSecurityConfig.java:</p>
  
  <p><a href="https://gist.github.com/mraible/c8b52972f76e6f5e30d5" rel="nofollow noreferrer">https://gist.github.com/mraible/c8b52972f76e6f5e30d5</a></p>
  
  <p>I found the following question that provides some guidance, but I can't quite get things to work.</p>
  
  <p><a href="https://stackoverflow.com/questions/15997221/configuring-saml-sample-sp-to-work-with-okta-idp">configuring saml-sample (SP) to work with Okta (IdP)</a></p>
  
  <p>Here's what I'm using for values on Okta:</p>
  
  <pre><code>Application label: Spring Boot SAML App
  Force Authentication: false
  Post Back URL: http://localhost:8080/
  Name ID Format: EmailAddressRecipient
  Recipient: http://localhost:8080/saml/SSO/alias/defaultAlias
  Audience Restriction: com:vdenotaris:spring:sp
  authnContextClassRef: PasswordProtectedTransport
  Response: Signed
  Assertion: Signed
  Request: Compressed
  Destination: http://localhost:8080/saml/SSO/alias/defaultAlias
  Default Relay State: (none)
  Attribute Statements: email|${user.email},firstName|${user.firstName}
  </code></pre>
  
  <p>It looks like it works from the logs:</p>
  
  <pre><code>[2014-12-30 12:18:33.004] boot - 18748 DEBUG [http-nio-8080-exec-8] --- BaseMessageEncoder: Successfully encoded message.
  [2014-12-30 12:18:33.004] boot - 18748 DEBUG [http-nio-8080-exec-8] --- HttpSessionStorage: Storing message a12gf64fh3f35fgh2a8dd1fd0i0dc02 to session C5D010344EF5D022718B12B6D25F1D1E
  [2014-12-30 12:18:33.004] boot - 18748  INFO [http-nio-8080-exec-8] --- SAMLDefaultLogger: AuthNRequest;SUCCESS;0:0:0:0:0:0:0:1;com:vdenotaris:spring:sp;http://www.okta.com/k2gpb06TOMYOKAWUSXJM;;;
  </code></pre>
  
  <p>However, it redirects me to Okta's site rather than back to my site.</p>