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
- Create config by running
cp src/config.defaults.js src/config.local.js
- Edit the
src/config.local.js
config as you wish [OPTIONAL] - Build docker image with
docker build . -t saml-idp
- Start image with
docker run -d --name saml-idp -p 7000:7000 saml-idp
- 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.
- Output it to terminal:
- Create config by running
cp src/config.defaults.js src/config.local.js
- Edit the
src/config.local.js
config as you wish [OPTIONAL] - 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
- E.g.
npm install
- Start Saml Idp server with
npm run start
- For more configuration options see
https://www.npmjs.com/package/saml-idp
- For more configuration options see
- Configure SSO settings in your application
- Add SSO Endpoint (default is
https://localhost:7000/saml/sso
) - Copy the generated public cert to the application settings
- Add SSO Endpoint (default is
- Add
issuer
to the root of the object exported fromconfig.local.js
issuer
should point to theSAML consumer URL
of your applicationdocker build -t saml-idp .
- 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
- E.g.
- Configure SSO settings in your application
- Add SSO Endpoint (default is
https://localhost:7000/saml/sso
) - Copy the generated public cert to the application settings
- Add SSO Endpoint (default is
- Start Saml Idp server with
npm run start
- For more configuration options see
https://www.npmjs.com/package/saml-idp
- For more configuration options see