Skip to content

Kavboy/node-saml

 
 

Repository files navigation

ID-Management with Keycloak and Node.js

Prerequistes

  1. Docker with docker-compose
  2. Node.js for Testing

SAML with Keycloak

  1. Start containers:
docker-compose up -d
  1. Open Admin-Console

http://localhost:8080/auth/

User: admin, Password: admin (same as in docker-compose.yml, should be changed)

  1. Configure Keycloak
  1. Extract Key and Cert from keystore.p12

These keys/certs are stored in <projectdir>/certs

mkdir certs
openssl pkcs12 -in keystore.p12 -nocerts -out certs/privateKey.pem -passin pass:"1234"

Remove Password from Private Key

openssl rsa -in certs/privateKey.pem -out certs/key.pem -passin pass:"1234"

Extract server public key

openssl pkcs12 -in keystore.p12 -clcerts -nokeys -out certs/server.crt
  1. Add users (see Manage Users)

  2. Login to Keycloak as User

  1. Open WebApp: http://localhost:8100/
# install node dependancies
npm i

# start node web server
node app.js

SUCCESS!

Credits/Sources:

Node/Express-App from https://codeburst.io/keycloak-and-express-7c71693d507a

Links

https://www.keycloak.org/docs/latest/getting_started/index.html

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 71.9%
  • Handlebars 22.8%
  • Dockerfile 5.3%