{"id":15609056,"url":"https://github.com/kenchan0130/docker-simplesamlphp","last_synced_at":"2025-04-06T04:09:36.655Z","repository":{"id":39030230,"uuid":"224781503","full_name":"kenchan0130/docker-simplesamlphp","owner":"kenchan0130","description":"Dockerized plug and play SAML 2.0 Identity Provider (IdP) for development and testing.","archived":false,"fork":false,"pushed_at":"2024-10-31T00:28:42.000Z","size":101,"stargazers_count":75,"open_issues_count":11,"forks_count":35,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T03:03:50.915Z","etag":null,"topics":["azuread","docker","docker-compose","idp","saml","simplesamlphp","test"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/kenchan0130/simplesamlphp","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kenchan0130.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-29T05:16:38.000Z","updated_at":"2025-03-24T00:00:04.000Z","dependencies_parsed_at":"2024-10-03T05:41:14.483Z","dependency_job_id":"9ee2ce20-6b83-445d-8304-538b5c2a3388","html_url":"https://github.com/kenchan0130/docker-simplesamlphp","commit_stats":{"total_commits":89,"total_committers":7,"mean_commits":"12.714285714285714","dds":0.3932584269662921,"last_synced_commit":"f3fa33eb295aded234cf740ce4026e0ad43f76c4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenchan0130%2Fdocker-simplesamlphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenchan0130%2Fdocker-simplesamlphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenchan0130%2Fdocker-simplesamlphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenchan0130%2Fdocker-simplesamlphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenchan0130","download_url":"https://codeload.github.com/kenchan0130/docker-simplesamlphp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430869,"owners_count":20937874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azuread","docker","docker-compose","idp","saml","simplesamlphp","test"],"created_at":"2024-10-03T05:41:03.920Z","updated_at":"2025-04-06T04:09:36.586Z","avatar_url":"https://github.com/kenchan0130.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Test SAML 2.0 Identity Provider (IdP)\n\n[![](https://img.shields.io/docker/v/kenchan0130/simplesamlphp?sort=semver)](https://hub.docker.com/r/kenchan0130/simplesamlphp)\n[![](https://github.com/kenchan0130/docker-simplesamlphp/workflows/CI/badge.svg)](https://github.com/kenchan0130/docker-simplesamlphp/actions?query=workflow%3ACI)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/kenchan0130/docker-simplesamlphp/blob/master/LICENSE)\n\nDocker container with a plug and play SAML 2.0 Identity Provider (IdP) for development and testing.\n\nBuilt with [SimpleSAMLphp](https://simplesamlphp.org/). Based on [official PHP8 Apache image](https://hub.docker.com/_/php/).\n\nSimpleSAMLphp is logging to stdout on debug log level. Apache is logging error and access log to stdout.\n\n**You must not use at your production. This is for test.**\n\n## Usage\n\n### Using docker run command\n\n```sh\ndocker run --name=idp \\\n  -p 8080:8080 \\\n  -e SIMPLESAMLPHP_SP_ENTITY_ID=http://app.example.com \\\n  -e SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost/simplesaml/module.php/saml/sp/saml2-acs.php/test-sp \\\n  -e SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE=http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp \\\n  -d kenchan0130/simplesamlphp\n```\n\n### Using docker-compose\n\n```yml\nversion: \"3\"\nservices:\n  idp:\n    image: kenchan0130/simplesamlphp\n    container_name: idp\n    ports:\n      - \"8080:8080\"\n    environment:\n      SIMPLESAMLPHP_SP_ENTITY_ID: http://app.example.com\n      SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE: http://localhost/simplesaml/module.php/saml/sp/saml2-acs.php/test-sp\n      SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE: http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp\n```\n\nThere are two static users configured in the IdP with the following data:\n\nUsername|Password\n---|---\nuser1|password\nuser2|password\n\nAnd there is one admin:\n\nUsername|Password\n---|---\nadmin|secret\n\n## Environment Variables\n\nName|Required/Optional|Description\n---|---|---\n`SIMPLESAMLPHP_SP_ENTITY_ID`|Required|The entity ID of your SP.\n`SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE`|Requried|The assertion consumer service of your SP.\n`SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE`|Optional|The single logout url of your SP.\n`SIMPLESAMLPHP_IDP_ADMIN_PASSWORD`|Optional|The password of admin of this IdP. Default is `secret`.\n`SIMPLESAMLPHP_IDP_SECRET_SALT`|Optional|This is a secret salt used by this IdP when it needs to generate a secure hash of a value. Default is `defaultsecretsalt`.\n`SIMPLESAMLPHP_IDP_SESSION_DURATION_SECONDS`|Optional|This value is the duration of the session of this IdP in seconds.\n`SIMPLESAMLPHP_IDP_BASE_URL`|Optional|This value allows you to override the base URL. Valuable for setting an `https://` base url behind a reverse proxy. **If you set this variable, please end it with a trailing `/`** example: `https://my.proxy.com/` Default is `` (empty string).\n\n## Advanced Usage\n\n### Customize IdP Users\n\nIf you want to customize IdP users, you can define your own users by mounting a configuration file.\n\n```php\n\u003c?php\n// These attributes mimic those of Azure AD.\n$test_user_base = array(\n    'http://schemas.microsoft.com/identity/claims/tenantid' =\u003e 'ab4f07dc-b661-48a3-a173-d0103d6981b2',\n    'http://schemas.microsoft.com/identity/claims/objectidentifier' =\u003e '',\n    'http://schemas.microsoft.com/identity/claims/displayname' =\u003e '',\n    'http://schemas.microsoft.com/ws/2008/06/identity/claims/groups' =\u003e array(),\n    'http://schemas.microsoft.com/identity/claims/identityprovider' =\u003e 'https://sts.windows.net/da2a1472-abd3-47c9-95a4-4a0068312122/',\n    'http://schemas.microsoft.com/claims/authnmethodsreferences' =\u003e array('http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password', 'http://schemas.microsoft.com/claims/multipleauthn'),\n    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress' =\u003e '',\n    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname' =\u003e '',\n    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname' =\u003e '',\n    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name' =\u003e ''\n);\n\n$config = array(\n    'admin' =\u003e array(\n        'core:AdminPassword',\n    ),\n    'example-userpass' =\u003e array(\n        'exampleauth:UserPass',\n        'user1:password' =\u003e array_merge($test_user_base, array(\n            'http://schemas.microsoft.com/identity/claims/objectidentifier' =\u003e 'f2d75402-e1ae-40fe-8cc9-98ca1ab9cd5e',\n            'http://schemas.microsoft.com/identity/claims/displayname' =\u003e 'User1 Taro',\n            'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress' =\u003e 'user1@example.com',\n            'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname' =\u003e 'Taro',\n            'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname' =\u003e 'User1',\n            'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name' =\u003e 'user1@example.com'\n        )),\n        'user2:password' =\u003e array_merge($test_user_base, array(\n            'http://schemas.microsoft.com/identity/claims/objectidentifier' =\u003e 'f2a94916-2fcb-4b68-9eb1-5436309006a3',\n            'http://schemas.microsoft.com/identity/claims/displayname' =\u003e 'User2 Taro',\n            'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress' =\u003e 'user2@example.com',\n            'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname' =\u003e 'Taro',\n            'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname' =\u003e 'User2',\n            'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name' =\u003e 'user2@example.com'\n        )),\n    ),\n);\n```\n\nIf you save this source as `authsources.php`, you can customize IdP users by volume mount like:\n\n**docker run command**\n\n```sh\ndocker run --name=idp \\\n  -p 8080:8080 \\\n  -e SIMPLESAMLPHP_SP_ENTITY_ID=http://app.example.com \\\n  -e SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost/simplesaml/module.php/saml/sp/saml2-acs.php/test-sp \\\n  -e SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE=http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp \\\n  -v $PWD/authsources.php:/var/www/simplesamlphp/config/authsources.php \\\n  -d kenchan0130/simplesamlphp\n```\n\n**docker-compose**\n\n```yml\nversion: \"3\"\nservices:\n  idp:\n    image: kenchan0130/simplesamlphp\n    container_name: idp\n    ports:\n      - \"8080:8080\"\n    environment:\n      SIMPLESAMLPHP_SP_ENTITY_ID: http://app.example.com\n      SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE: http://localhost/simplesaml/module.php/saml/sp/saml2-acs.php/test-sp\n      SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE: http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp\n    volumes:\n      - authsources.php:/var/www/simplesamlphp/config/authsources.php\n```\n\nFor detailed attributes, see [SimpleSAMLphp Identity Provider QuickStart#Authentication module](https://simplesamlphp.org/docs/stable/simplesamlphp-idp#section_2).\n\n### Customize SP remote metadata reference\n\nIf you want to customize SP remote metadata reference, you can define your own users by mounting a configuration file.\n\n```php\n\u003c?php\n/* The index of the array is the entity ID of this SP. */\n$metadata['entity-id-1'] = array(\n    'AssertionConsumerService' =\u003e 'http://localhost/simplesaml/module.php/saml/sp/saml2-acs.php/test-sp',\n    ForceAuthn =\u003e true\n);\n$metadata['entity-id-2'] = array(\n    'AssertionConsumerService' =\u003e 'http://localhost/saml/acs',\n    'SingleLogoutService' =\u003e 'http://localhost/saml/logout'\n);\n```\n\nIf you save this source as `saml20-sp-remote.php`, you can customize IdP users by volume mount like:\n\n**docker run command**\n\n```sh\ndocker run --name=idp \\\n  -p 8080:8080 \\\n  -v saml20-sp-remote.php:/var/www/simplesamlphp/metadata/saml20-sp-remote.php \\\n  -d kenchan0130/simplesamlphp\n```\n\n**docker-compose**\n\n```yml\nversion: \"3\"\nservices:\n  idp:\n    image: kenchan0130/simplesamlphp\n    container_name: idp\n    ports:\n      - \"8080:8080\"\n    volumes:\n      - saml20-sp-remote.php:/var/www/simplesamlphp/metadata/saml20-sp-remote.php\n```\n\nFor detailed attributes, see [SP remote metadata reference#SAML 2.0 options](https://simplesamlphp.org/docs/stable/simplesamlphp-reference-sp-remote#section_2).\n\n## Inspired By\n\n- https://github.com/kristophjunge/docker-test-saml-idp\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenchan0130%2Fdocker-simplesamlphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenchan0130%2Fdocker-simplesamlphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenchan0130%2Fdocker-simplesamlphp/lists"}