@@ -46,7 +46,11 @@ Click the _Login_ link on the left pane. The root user name and password for
4646the LDAP server are ` cn=admin,dc=wgd,dc=com ` and ` i found something ` ,
4747respectively.
4848
49- You can then use the phpLDAPAdmin UI to setup a simple group structure.
49+ The docker/docker-compose.yml file starts up the mage-idp-ldap container with the ldapseed.ldiff file.
50+ This file will seed the ldap server with a batman and robin user under the Field Agents org. Below are steps to do the same
51+ using the phpLDAPAdmin UI should any more users need to be generated.
52+
53+ Using the phpLDAPAdmin UI to setup a simple group structure.
50541 . Click the _ dc=wgd,dc=com_ root node in the tree view on the left of the page.
51551 . In the main pane, click _ Create a child entry_ .
52561 . Select the _ Generic: Posix Group_ template.
@@ -79,9 +83,7 @@ authentication in MAGE. This assumes you're running a MAGE server on
7983http://localhost:4242 .
80841 . Open the MAGE web app in your browser.
81851 . Click the gear icon in the top right to load the _ Admin_ page.
82- 1 . Click the _ Settings_ tab in the vertical tab strip on the left.
83- 1 . The _ Authentication_ tab in the main pane should already be active. Click
84- the tab if not.
86+ 1 . Click the _ Security_ tab in the vertical tab strip on the left.
85871 . Click the _ New Authentication_ button.
86881 . Enter a title for the authentication IDP, e.g. ` Test LDAP ` .
87891 . Click the _ Next_ button.
@@ -126,3 +128,50 @@ http://localhost:4242.
1261281 . The app may prompt for a device UID if your settings dictate. Enter the
127129 device UID.
1281301 . You are now authenticated with your LDAP account.
131+
132+ ## SAML
133+ You can setup MAGE to authenticate users with an SAML server. For development
134+ testing, the [ ` auth-idp ` ] ( ../docker/auth-idp/docker-compose.yml ) Compose file
135+ uses the [ kristophjunge/test-saml-idp] ( https://github.com/kristophjunge/docker-test-saml-idp )
136+ Start the ` mage-idp-saml ` SAML
137+ service with the following commands.
138+ ``` bash
139+ cd docker/auth-idp
140+ docker compose up -d mage-idp-saml
141+ ```
142+
143+ The docker compose file is set to seed a few users with the .saml/authsources.php file. This
144+ file is mounted under volumes in the docker compose. Once it is spun up, you are ready to
145+ configure your saml authentication provider.
146+
147+ 1 . Open the MAGE web app in your browser.
148+ 1 . Click the gear icon in the top right to load the _ Admin_ page.
149+ 1 . Click the _ Security_ tab in the vertical tab strip on the left.
150+ 1 . Click the _ New Authentication_ button.
151+ 1 . Enter a title for the authentication IDP, e.g. ` Test SAML ` .
152+ 1 . Click the _ Next_ button.
153+ 1 . Fill in the _ Settings_ fields as follows.
154+ | | |
155+ | ---: | ---|
156+ | ** _ Idepntity Provider (idP)_ ** |
157+ | _ Entry Point_ | ` http://localhost:8080/simplesaml/saml2/idp/SSOService.php ` |
158+ | _ Issuer_ | ` http://localhost:4242 ` |
159+ | _ Redirect Host_ | ` http://localhost:4242/auth/saml/callback ` |
160+ | ** _ Security_ ** |
161+ | _ idP Public Signing Certificate_ | navigate to http://localhost:8080/simplesaml/saml2/idp/metadata.php . look for the < ds:X509Certificate > tag and copy everything in that tag |
162+ | ** _ Validation_ ** |
163+ | ** _ Issuer_ ** |
164+ | _ idP Issuer_ | ` http://localhost:8080/simplesaml/saml2/idp/metadata.php ` |
165+ | ** _ Logout_ ** |
166+ | _ logout URL_ | ` http://localhost:8080/simplesaml/saml2/idp/SingleLogoutService.php ` |
167+ 1 . Click the _ Next_ button.
168+ 1 . Adjust the color settings to your preference.
169+ 1 . Click the _ Next_ button.
170+ 1 . Review the settings and click the _ Save_ button.
171+ 1 . Open a new private browser tab or window and load your MAGE server web app.
172+ 1 . The sign-in page should display a button labeled _ Continue with SAML_
173+ 1 . Clicking this button will take you to a simple login page where the saml server is running.
174+ 1 . for Username enter ` saml.user1 `
175+ 1 . for Pasword enter ` user2pass `
176+ 1 . Depending on how the login was configured, you will either be redirected through to the application, or
177+ a user will have been created which will require approval from an admin.
0 commit comments