From e83953f24ec18f5ed47c1d326bff829693bfdea8 Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Tue, 25 Jun 2019 13:31:27 +0200 Subject: [PATCH] Devenv:SAML: devenv block with saml test app (#17733) * Devenv:SAML: devenv block with saml test app Includes documentation, couple custom users and actual docker-compose of course :) Ref: #4780 --- devenv/docker/blocks/saml/docker-compose.yaml | 16 ++++++++++++++ devenv/docker/blocks/saml/notes.md | 16 ++++++++++++++ devenv/docker/blocks/saml/users.php | 21 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 devenv/docker/blocks/saml/docker-compose.yaml create mode 100644 devenv/docker/blocks/saml/notes.md create mode 100644 devenv/docker/blocks/saml/users.php diff --git a/devenv/docker/blocks/saml/docker-compose.yaml b/devenv/docker/blocks/saml/docker-compose.yaml new file mode 100644 index 00000000000..ffd1fec8d30 --- /dev/null +++ b/devenv/docker/blocks/saml/docker-compose.yaml @@ -0,0 +1,16 @@ + saml: + container_name: saml + image: kristophjunge/test-saml-idp + environment: + SIMPLESAMLPHP_SP_ENTITY_ID: http://grafana.com + SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE: http://localhost/simplesaml/module.php/saml/sp/saml2-acs.php/test-sp + SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE: http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp + SIMPLESAMLPHP_ADMIN_PASSWORD: grafana + SIMPLESAMLPHP_SECRET_SALT: salt + ports: + - "8080:8080" + - "8443:8443" + volumes: + - ./docker/blocks/saml/users.php:/var/www/simplesamlphp/config/authsources.php + + diff --git a/devenv/docker/blocks/saml/notes.md b/devenv/docker/blocks/saml/notes.md new file mode 100644 index 00000000000..3ea67ac4373 --- /dev/null +++ b/devenv/docker/blocks/saml/notes.md @@ -0,0 +1,16 @@ +# Notes on Saml Docker Block + +Uses https://github.com/kristophjunge/docker-test-saml-idp as a docker container for saml example. + +## Use + +See docker container docs on how to use this service - https://github.com/kristophjunge/docker-test-saml-idp#test-the-identity-provider-idp + +## Groups & Users + +admins + saml-admin (saml-admin@grafana.com) +editors + saml-editor (saml-editor@grafana.com) +no groups + saml-viewer (saml-viewer@grafana.com) diff --git a/devenv/docker/blocks/saml/users.php b/devenv/docker/blocks/saml/users.php new file mode 100644 index 00000000000..498d86f5734 --- /dev/null +++ b/devenv/docker/blocks/saml/users.php @@ -0,0 +1,21 @@ + array( + 'core:AdminPassword', + ), + 'grafana-userpass' => array( + 'exampleauth:UserPass', + 'saml-admin:grafana' => array( + 'groups' => array('admins'), + 'email' => 'saml-admin@grafana.com', + ), + 'saml-editor:grafana' => array( + 'groups' => array('editors'), + 'email' => 'saml-editor@grafana.com', + ), + 'saml-viewer:grafana' => array( + 'groups' => array(), + 'email' => 'saml-viewer@grafana.com', + ), + ), +);