Coder Social home page Coder Social logo

saml-idp's Introduction

Setup SSO server

Running with docker-compose

The easiest way to run this is with docker-compose

Just run docker-compose up and the container should be good to go.

To config your application, see Use the local SSO in your application

With Docker

  1. Create config by running cp src/config.defaults.js src/config.local.js
  2. Edit the src/config.local.js config as you wish [OPTIONAL]
  3. Build docker image with docker build . -t saml-idp
  4. Start image with docker run -d --name saml-idp -p 7000:7000 saml-idp
  5. Get the public cert from inside the container
    • Output it to terminal: docker exec -it saml-idp cat idp-public-cert.pem OR
    • Copy it: docker cp saml-idp:/usr/src/app/idp-public-cert.pem . This builds on kirstu's saml-idp by adding docker containerization and automatic generation of a certificate and key pair on first startup.

Without Docker

  1. Create config by running cp src/config.defaults.js src/config.local.js
  2. Edit the src/config.local.js config as you wish [OPTIONAL]
  3. Generate cert & key
    • E.g. openssl req -x509 -new -newkey rsa:2048 -nodes -subj '/C=US/ST=California/L=San Francisco/O=JankyCo/CN=Test Identity Provider' -keyout idp-private-key.pem -out idp-public-cert.pem -days 7300
  4. npm install
  5. Start Saml Idp server with npm run start

Use the local SSO in your application

  1. Configure SSO settings in your application
    1. Add SSO Endpoint (default is http://localhost:7000/saml/sso)
    2. Copy the generated public cert to the application settings
  2. Add issuer to the root of the object exported from config.local.js
    • issuer should point to the SAML consumer URL of your application docker build -t saml-idp .

Generating cert & key manually

  1. Generate cert & key
    • E.g. openssl req -x509 -new -newkey rsa:2048 -nodes -subj '/C=US/ST=California/L=San Francisco/O=JankyCo/CN=Test Identity Provider' -keyout idp-private-key.pem -out idp-public-cert.pem -days 7300
  2. Configure SSO settings in your application
    1. Add SSO Endpoint (default is http://localhost:7000/saml/sso)
    2. Copy the generated public cert to the application settings
  3. Start Saml Idp server with npm run start

saml-idp's People

Contributors

kirstu avatar kallja avatar dependabot[bot] avatar aapzu 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.