https://github.com/unb-libraries/docker-simplesamlphp
An image to test SAML authentication locally.
https://github.com/unb-libraries/docker-simplesamlphp
Last synced: about 1 year ago
JSON representation
An image to test SAML authentication locally.
- Host: GitHub
- URL: https://github.com/unb-libraries/docker-simplesamlphp
- Owner: unb-libraries
- License: mit
- Created: 2023-05-11T17:24:11.000Z (about 3 years ago)
- Default Branch: 1.x
- Last Pushed: 2024-02-12T16:02:50.000Z (over 2 years ago)
- Last Synced: 2025-02-15T18:53:28.311Z (over 1 year ago)
- Language: PHP
- Size: 13.7 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unb-libraries/docker-simplesamlphp
A Docker image to add local SAML authentication to your _Docker Compose_ project, based on SimpleSAMLPHP.
## Usage
Add the following to your ```docker-compose.yml``` file:
```yml
services:
# ...
idp-myproject-lib-unb-ca:
image: ghcr.io/unb-libraries/simplesamlphp
container_name: idp.myproject.lib.unb.ca
restart: unless-stopped
env_file:
- ./env/saml.env
networks:
- unbgeology.lib.unb.ca
ports:
- 8080:8080
- 8443:8443
```
Provide the following environment variables, e.g. in a ```.env``` (filename must match the file you reference in above snippet):
```sh
# A unique identifier of your local Service Provider (SP)
SIMPLESAMLPHP_SP_ENTITY_ID='localhost'
# Callback URL after successful SAML authentication
SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE='http://localhost:3000/login/saml'
# (optional) Use a different set of users. Refer to build/config/users for available options.
SIMPLESAMLPHP_USERSET='unb'
```
Edit variable values, e.g. port numbers, paths, accordingly to your project's needs.
Finally, rebuild your docker project.
### Users
The image comes with 12 sample UNB users, distributed into "members", "staff", "faculty", "student", and "stu" groups. Every user login follows a ```:pass``` schema.
| UID | First Name | Last Name | Groups |
|-------|------------|-----------|------------------------|
| jdoe | Jane | Doe | members, staff |
| msmi | Michael | Smith | members, staff |
| awil | Alice | Wilson | members, staff |
| brob | Brian | Robinson | members, staff |
| egra | Emily | Grant | members, staff |
| jcru | Jessica | Cruz | members, faculty |
| brod | Benjamin | Rodriguez | members, staff |
| fmar | Fiona | Martin | members, faculty |
| mwan | Michelle | Wang | members, staff |
| kpat | Kyle | Patterson | members, student |
| nbak | Natalie | Baker | members, staff |
| jpar | Jessica | Park | stu |
## Test
Verify that your local SAML IDP service is setup and configured correctly:
- visit [http://localhost:3000/simplesaml/module.php/core/authenticate.php](http://localhost:3000/simplesaml/module.php/core/authenticate.php)
- click on _"example-userpass"_
- login as a user from your chosen userset
## License
- As part of our 'open' ethos, UNB Libraries licenses its applications and workflows to be freely available to all whenever possible.
- Consequently, the contents of this repository [unb-libraries/docker-drupal] are licensed under the [MIT License](http://opensource.org/licenses/mit-license.html). This license explicitly excludes:
- Any website content, which remains the exclusive property of its author(s).
- The UNB logo and any of the associated suite of visual identity assets, which remains the exclusive property of the University of New Brunswick.