Skip to content

Using Okta Identity Provider with Wildfly/Picketlink SAML Service Provider

Notifications You must be signed in to change notification settings

ab0ndar/wildfly-okta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wildfly-okta

Simple example demonstrates how to integrate Okta as Identity Provider into Wildfly application server (aka open source JBOSS) which serves as Service Provider by means of PicketLink framework. There are two SAML 2.0 bindings shown: REDIRECT in the sp-redirect module and POST in the sp-post correspondingly. This example extends couple of PicketLink classes (see sp-common classes) in order to overcome discrepancies in SAML 2.0 implementation between PicketLink and Okta.

Prerequisites

First, we need to open access to our local SP from the Internet, so Okta IDP can send HTTP requests thereto. Instructions below assume you have established ngrok tunnel to the Wildfly instance running on your localhost. So, here is a link to ngrok

Infrastructure

  1. Install & run local instance of WildFly

  2. Start tunnel to the local WildFly instance

    $ ./ngrok http 8080
    
    ngrok by @inconshreveable
    
    Tunnel Status                 online
    Version                       2.0.25/2.0.25
    Region                        United States (us)
    Web Interface                 http://127.0.0.1:4040
    Forwarding                    http://xxxxxxxx.ngrok.io -> localhost:8080
    Forwarding                    https://xxxxxxxx.ngrok.io -> localhost:8080
    

Run sp-redirect sample

  1. If you ran another sample before, clean up the WildFly configuration first:

    mvn3 install -P clean
    
  2. Install "sp" security domain to WildFly

    $ mvn install -P conf -Dservice.url=http://xxxxxxxx.ngrok.io/hello -Didp.url=http://idp.oktadev.com
    
  3. Build and install sample application

    $ mvn install wildfly:deploy
    
  4. Open http://localhost:8080/hello in browser

  5. You will be redirected to Okta Development IDP

  6. Put service url into "Issuer", "SP ACS URL" and "SP Audience URI" fields

  7. Click "Sign In"

Run sp-post sample

  1. If you ran another sample before, clean up the WildFly configuration first:

    mvn3 install -P clean
    
  2. Install "sp" security domain to WildFly

    $ mvn install -P conf -Dservice.url=http://xxxxxxxx.ngrok.io/hola -Didp.url=http://idp.oktadev.com
    
  3. Build and install sample application

    $ mvn install wildfly:deploy
    
  4. Open http://localhost:8080/halo in browser

  5. You will be redirected to Okta Development IDP

  6. Put service url into "Issuer", "SP ACS URL" and "SP Audience URI" fields

  7. Click "Sign In"

About

Using Okta Identity Provider with Wildfly/Picketlink SAML Service Provider

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published