Single Sign On (SSO) solution based on SAML
-
docker pull kristophjunge/test-saml-idp
-
docker run --name=testsamlidp -p 8080:8080 -p 8443:8443 -e SIMPLESAMLPHP_SP_ENTITY_ID=saml-poc -e SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost:4300/login/callback -d kristophjunge/test-saml-idp
-
openssl req -x509 -newkey rsa:4096 -keyout certs\key.pem -out certs\cert.pem -nodes -days 900
-
docker ps
-
docker exec -it a5a7599fcfac bash
-
edit simplesaml metadata
vi metadata/saml20-sp-remote.php
$metadata[getenv('SIMPLESAMLPHP_SP_ENTITY_ID')] = array( 'AssertionConsumerService' => getenv('SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE'), 'SingleLogoutService' => getenv('SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE'), ); $metadata['saml-my'] = array( 'AssertionConsumerService' => 'http://localhost:4004/saml/login', 'SingleLogoutService' => 'http://localhost:4004/saml/logout', 'entityid' => 'saml-my', 'metadata-set' => 'saml20-sp-remote', );
:wq
-
http://localhost:8080/simplesaml/module.php/core/frontpage_federation.php
- ./cfg/authsources.php for users
- ./cfg/saml20-sp-remote.php for SP
- docker-compose up
- docker-compose exec idp bash
- cat metadata/saml20-sp-remote.php
For more information see: Setup a single sign on saml or Docker Test SAML 2.0 Identity Provider (IdP)
- npm install
- npm start
- http://localhost:4004
There are two static users configured in the IdP with the following data:
UID Username Password Group Email
--------------------------------------------------------
1 user1 user1pass group1 [email protected]
2 user2 user2pass group2 [email protected]
And there is one admin:
Username Password
--------------------------------------------------------
admin secret