Skip to content

jeanbza/git-java-okta-saml-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-java-okta-saml-example

Okta SAML example with Spring Security

Set up a test okta

Basic setup

  1. Navigate to http://developer.okta.com/
  2. Click on Get Started
  3. Fill in your own name and email address
  4. Okta will send you a confirmation email, including your temporary password and a link to your new developer Okta instance
  5. Navigate to the link in the email, and input your email address and the temporary password provided to you
  6. Fill in the form presented to complete your registration, and click on Create My Account
  7. You should now have an empty Okta instance with no apps, and only one user.

Create a test application

  1. Click on Admin, then Add Applications
  2. Click on Create New App
  3. Select SAML 2.0 and click Create
  4. Call the app 'Colombia' and click Next
  5. Fill in Single sign on URL with https://localhost:8443/saml/SSO
  6. Fill in Audience URI with com:example
  7. Your config should look like this okta config
  8. The rest of the fields can be left as they began, click Next
  9. Select I'm an Okta customer adding an internal app
  10. Check This is an internal app that we have created
  11. Click Finish
  12. Click View Setup Instructions
  13. Copy the xml IDP Metadata from the Optional section into a filein your project: src/main/resources/saml/colombia-metadata.xml

Assign the test application

  1. Return to your Okta home screen and click Admin
  2. Click Assign Applications
  3. Select Colombia and yourself, then click Next
  4. Click Confirm Assignments

One time application setup

  1. Generate a keystore and key in src/main/resources/saml with password colombia-password:

keytool -genkey -v -keystore colombia.jks -alias colombia -keyalg RSA -keysize 2048 -validity 10000

Running the app

  1. ./gradlew clean bootRun
  2. Navigate to http://localhost:8443

About

Okta SAML example with Spring Security

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors