GithubHelp home page GithubHelp logo

identity-provider-demo's Introduction

Identity Provider Demo

Purpose

Demonstrate:

  • Standing up an Identity Provider (IDP)(user login provider)
  • Import users from an LDAP instance via User Federation
  • Connect a SAML Service Provider to support user authentication
  • (hopefully) Use SAML auth to create OAuth JWT token

Auth Mechanisms

Some docs to help understand SAML and OAuth:

ToDo

  • Standup Identity Provider (Complete)
  • Connect to IDP with 'Service Provider' for SSO (Complete)
  • Identity Provider provides OAuth token (Complete)
  • Hook up Reverse-Proxy to handle API token validation (using 'forward-auth')

Future:

Test LDAP Configuration

This repo will use an LDAP instance which contains a pre-populated set of 'people'.

LDAP Container used

LDAP things:

dc=planetexpress,dc=com
ou=people,dc=planetexpress,dc=com
cn=Hubert J. Farnsworth,ou=people,dc=planetexpress,dc=com

Configuring KeyCloak

Using KeyCloak as the Idenity Provider https://github.com/jboss-dockerfiles/keycloak

Configuring the Image: https://github.com/jboss-dockerfiles/keycloak/blob/master/server/README.md

Configuring an LDAP User Federation Provider

First:

docker-compose up

Wait for the services to spin up. This may take a minute.

Go to http://localhost:8080

Then:

  • Open KeyCloak Admin console
  • Go to "User Federation"
  • "Add Provider" > "ldap"
  • Add configuration details
    • Vendor: "Other"
    • Connection Url: "LDAP://ldap"
    • Users DN: "ou=people,dc=planetexpress,dc=com"
    • Bind DN: "cn=admin,dc=planetexpress,dc=com"
    • Bind Credential: "GoodNewsEveryone"
  • Test the "Connection URL"
  • Test the Authentication
  • Save
  • "Syncronize all users"
  • Go to "Manage" > "Users" on the left panel > Click "View all users"

You should see the users that have been added! Success!

Service Provider Setup

Incomplete:

This configuration needs to be improved, it may not be completely correct.

  • Go to Configure > Clients

  • Select "Create"

  • "Save"

  • Update properties:

    • "IDP Initiated SSO URL Name": "demo"
    • "Sign Assertion" true
    • "Encrypt Assertions: false - This needs to be off for now
  • Update "Fine Grain SAML Endpoint Configuration" properties

  • Save

  • Once created, go into "SAML Keys" tab

  • Copy the certificate key to service-provider/cert-file.crt and the private key to service-provider/key-file.pem

  • Then go to Configure > Realm Settings > Keys > RSA256 > Certificate and copy the cert to service-provider/cert-file-idp.crt

OAuth/OpenId Service Provider

Reverse-Proxy OpenId/OAuth Token Validation

To look at:

Integrating Traefik with an OpenID Connect service

identity-provider-demo's People

Contributors

gregberns avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.