summary refs log tree commit diff
diff options
context:
space:
mode:
authorhungrymonkey <771339+hungrymonkey@users.noreply.github.com>2020-06-16 08:28:21 -0700
committerGitHub <noreply@github.com>2020-06-16 11:28:21 -0400
commit5c5516f80ef08dc07c1a7c297614f455c1bc75d4 (patch)
treec3060f66c188957b7c6440652a56b9e7e48d1763
parentInclude a user agent in federation requests. (#7677) (diff)
downloadsynapse-5c5516f80ef08dc07c1a7c297614f455c1bc75d4.tar.xz
Add instructions for authing with Keycloak via OpenID (#7659)
Diffstat (limited to '')
-rw-r--r--changelog.d/7659.doc1
-rw-r--r--docs/openid.md44
2 files changed, 45 insertions, 0 deletions
diff --git a/changelog.d/7659.doc b/changelog.d/7659.doc
new file mode 100644
index 0000000000..1d3458a353
--- /dev/null
+++ b/changelog.d/7659.doc
@@ -0,0 +1 @@
+Added instructions for how to use Keycloak via OpenID Connect to authenticate with Synapse.
diff --git a/docs/openid.md b/docs/openid.md
index 688379ddd9..70b37f858b 100644
--- a/docs/openid.md
+++ b/docs/openid.md
@@ -23,6 +23,7 @@ such as [Github][github-idp].
 [auth0]: https://auth0.com/
 [okta]: https://www.okta.com/
 [dex-idp]: https://github.com/dexidp/dex
+[keycloak-idp]: https://www.keycloak.org/docs/latest/server_admin/#sso-protocols
 [hydra]: https://www.ory.sh/docs/hydra/
 [github-idp]: https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps
 
@@ -89,7 +90,50 @@ oidc_config:
        localpart_template: "{{ user.name }}"
        display_name_template: "{{ user.name|capitalize }}"
 ```
+### [Keycloak][keycloak-idp]
 
+[Keycloak][keycloak-idp] is an opensource IdP maintained by Red Hat. 
+
+Follow the [Getting Started Guide](https://www.keycloak.org/getting-started) to install Keycloak and set up a realm.
+
+1. Click `Clients` in the sidebar and click `Create`
+
+2. Fill in the fields as below:
+
+| Field | Value |
+|-----------|-----------|
+| Client ID | `synapse` |
+| Client Protocol | `openid-connect` |
+
+3. Click `Save`
+4. Fill in the fields as below:
+
+| Field | Value |
+|-----------|-----------|
+| Client ID | `synapse` |
+| Enabled | `On` |
+| Client Protocol | `openid-connect` |
+| Access Type | `confidential` |
+| Valid Redirect URIs | `[synapse public baseurl]/_synapse/oidc/callback` |
+
+5. Click `Save`
+6. On the Credentials tab, update the fields:
+
+| Field | Value |
+|-------|-------|
+| Client Authenticator | `Client ID and Secret` |
+
+7. Click `Regenerate Secret`
+8. Copy Secret
+
+```yaml
+oidc_config:
+   enabled: true
+   issuer: "https://127.0.0.1:8443/auth/realms/{realm_name}"
+   client_id: "synapse"
+   client_secret: "copy secret generated from above"
+   scopes: ["openid", "profile"]
+```
 ### [Auth0][auth0]
 
 1. Create a regular web application for Synapse