diff options
author | Travis Ralston <travpc@gmail.com> | 2019-09-12 13:52:10 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-12 13:52:10 -0600 |
commit | a633a97c7af6745b282ed10b11d54d0f2eed6ccc (patch) | |
tree | 047512a6f9e20829221525a10f905fbec3acbdbe | |
parent | Fix for structured logging tests stomping on logs (#6023) (diff) | |
download | synapse-a633a97c7af6745b282ed10b11d54d0f2eed6ccc.tar.xz |
Add developer docs for using SAML without a server
-rw-r--r-- | docs/dev/saml.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/dev/saml.md b/docs/dev/saml.md new file mode 100644 index 0000000000..23c46195d4 --- /dev/null +++ b/docs/dev/saml.md @@ -0,0 +1,36 @@ +# How to test SAML as a developer without a server + +https://capriza.github.io/samling/samling.html (https://github.com/capriza/samling) is a great +resource for being able to tinker with the SAML options within Synapse without needing to +deploy and configure a complicated software stack. + +To make Synapse (and therefore Riot) use it: + +1. Use the samling.html URL above or deploy your own and visit the IdP Metadata tab. +2. Copy the XML to your clipboard. +3. On your Synapse server, create a new file `samling.xml` next to your `homeserver.yaml` with + the XML from step 2 as the contents. +4. Edit your `homeserver.yaml` to include: + ```yaml + saml2_config: + sp_config: + metadata: + local: ["samling.xml"] + ``` +5. Run `apt-get install xmlsec1` and `pip install --upgrade --force 'pysaml2>=4.5.0'` to ensure + the dependencies are installed and ready to go. +6. Restart Synapse. + +Then in Riot: + +1. Visit the login page with a Riot pointing at your homeserver. +2. Click the Single Sign-On button. +3. On the samling page, enter a Name Identifier and add a SAML Attribute for `uid=your_localpart`. + The response must also be signed. +4. Click "Next". +5. Click "Post Response" (change nothing). +6. You should be logged in. + +If you try and repeat this process, you may be automatically logged in using the information you +gave previously. To fix this, open your developer console (`F12` or `Ctrl+Shift+I`) while on the +samling page and clear the site data. In Chrome, this will be a button on the Application tab. |