Переглянути джерело

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
Oleg Gaidarenko 6 роки тому
батько
коміт
e83953f24e

+ 16 - 0
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
+
+

+ 16 - 0
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)

+ 21 - 0
devenv/docker/blocks/saml/users.php

@@ -0,0 +1,21 @@
+<?php
+$config = array(
+    'admin' => 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',
+        ),
+    ),
+);