2020-08-11 01:47:54 +02:00
|
|
|
# SAML authentication
|
2020-04-30 15:15:38 +02:00
|
|
|
|
2020-10-23 02:43:28 +02:00
|
|
|
Zulip supports using SAML authentication for single sign-on, both when
|
2020-04-30 15:15:38 +02:00
|
|
|
self-hosting or on the Zulip Cloud Plus plan.
|
|
|
|
|
docs: Add missing space to compound verbs “log in”, “set up”, etc.
Noun: backup, checkout, cleanup, login, logout, setup, shutdown, signup,
timeout.
Verb: back up, check out, clean up, log in, log out, set up, shut
down, sign up, time out.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-25 23:05:38 +02:00
|
|
|
This page documents details on how to set up SAML authentication with
|
docs: Add missing space to compound verbs “back up”, “log in”, etc.
Noun: backup, login, logout, lookup, setup.
Verb: back up, log in, log out, look up, set up.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-02-07 20:41:10 +01:00
|
|
|
Zulip with various common SAML identity providers. Once you have set up
|
2021-10-23 15:18:32 +02:00
|
|
|
SAML, you may also want to consider configuring [SCIM](/help/scim).
|
2020-04-30 15:15:38 +02:00
|
|
|
|
2021-07-14 13:27:44 +02:00
|
|
|
If you are self-hosting, this documentation is likely still useful for
|
|
|
|
how to configure these SAML providers to work with Zulip.
|
|
|
|
|
2020-04-30 15:15:38 +02:00
|
|
|
## Configure SAML with Okta
|
|
|
|
|
2021-09-08 18:47:30 +02:00
|
|
|
1. Make sure you have created your organization.
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2020-04-30 15:15:38 +02:00
|
|
|
1. Set up SAML authentication by following
|
|
|
|
[Okta's documentation](https://developer.okta.com/docs/guides/saml-application-setup/overview/).
|
|
|
|
Specify:
|
2021-09-08 18:47:30 +02:00
|
|
|
* `https://auth.zulipchat.com/complete/saml/` for the "Single sign on URL"`.
|
2021-09-13 20:31:53 +02:00
|
|
|
* `https://zulipchat.com` for the "Audience URI (SP Entity ID)".
|
2020-04-30 15:15:38 +02:00
|
|
|
* Skip "Default RelayState".
|
|
|
|
* Skip "Name ID format".
|
|
|
|
* Set 'Email` for "Application username format".
|
|
|
|
* Provide "Attribute statements" of `email` to `user.email`,
|
|
|
|
`first_name` to `user.firstName`, and `last_name` to `user.lastName`.
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2020-04-30 15:15:38 +02:00
|
|
|
1. Assign the appropriate accounts in the "Assignments" tab. These are the users
|
|
|
|
that will be able to log in to your Zulip organization.
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2020-05-28 02:00:13 +02:00
|
|
|
1. Send the following information to us at support@zulip.com:
|
2020-04-30 15:15:38 +02:00
|
|
|
* The URL of your zulipchat-hosted organization.
|
|
|
|
* The "Identity Provider metadata" provided by Okta for the application.
|
|
|
|
* The name "X" that will be displayed on the "Log in with X" button in Zulip.
|
|
|
|
* Optionally you can also send us an icon that should be shown on the button.
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2020-04-30 15:15:38 +02:00
|
|
|
1. We will take care of the server-side setup and let you know as soon as it's ready.
|
|
|
|
|
2020-10-23 02:43:28 +02:00
|
|
|
## Configure SAML with OneLogin
|
2020-04-30 15:15:38 +02:00
|
|
|
|
2021-09-08 18:47:30 +02:00
|
|
|
1. Make sure you have created your organization.
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2020-10-23 02:43:28 +02:00
|
|
|
1. Navigate to the OneLogin Applications page, and click "Add App".
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2021-11-15 19:12:47 +01:00
|
|
|
1. Search for the "SAML Custom Connector (Advanced)" app and select it.
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2020-04-30 15:15:38 +02:00
|
|
|
1. Set a name and logo according to your preferences and click "Save". This doesn't affect anything in Zulip,
|
|
|
|
but will be shown on your OneLogin Applications page.
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2020-04-30 15:15:38 +02:00
|
|
|
1. Go to the "Configuration" section:
|
2020-06-05 12:34:33 +02:00
|
|
|
* Leave the `RelayState` field empty.
|
2021-09-13 20:31:53 +02:00
|
|
|
* Set `https://zulipchat.com` as the Audience.
|
2021-09-08 18:47:30 +02:00
|
|
|
* Set `https://auth.zulipchat.com/complete/saml/` as the Recipient, ACS URL
|
2020-04-30 15:15:38 +02:00
|
|
|
and ACS URL Validator.
|
2021-11-15 19:12:47 +01:00
|
|
|
* Leave the remaining fields as they are.
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2020-06-05 12:34:33 +02:00
|
|
|
1. Go to the "Parameters" section. Ignore the pre-configured parameters that are already there
|
|
|
|
and add custom ones to match the following screenshot:
|
2020-04-30 15:15:38 +02:00
|
|
|
|
2020-10-23 02:43:28 +02:00
|
|
|
![OneLogin parameters](/static/images/help/onelogin_parameters.png)
|
2020-04-30 15:15:38 +02:00
|
|
|
|
2020-06-05 12:34:33 +02:00
|
|
|
Make sure to set the "Include in SAML assertion" flag on them.
|
2020-04-30 15:15:38 +02:00
|
|
|
|
|
|
|
1. The OneLogin side of configuration should be ready!
|
2020-05-28 02:00:13 +02:00
|
|
|
Send the following information to us at support@zulip.com:
|
2020-04-30 15:15:38 +02:00
|
|
|
* The URL of your zulipchat-hosted organization.
|
|
|
|
* The issuer URL from the "SSO" section. It contains Identity Provider metadata that we will need.
|
|
|
|
* The name "X" that will be displayed on the "Log in with X" button in Zulip.
|
|
|
|
* Optionally you can also send us an icon that should be shown on the button.
|
2021-08-20 19:52:01 +02:00
|
|
|
|
2020-04-30 15:15:38 +02:00
|
|
|
1. We will take care of the server-side setup and let you know as soon as it's ready.
|
|
|
|
|
2021-09-08 19:38:37 +02:00
|
|
|
## Configure SAML with AzureAD
|
|
|
|
|
|
|
|
1. Make sure you have created your organization.
|
|
|
|
|
|
|
|
1. From your AzureAD Dashboard, navigate to "Enterprise applications",
|
|
|
|
click "New application", followed by "Create your own application".
|
|
|
|
|
|
|
|
1. Enter a name (E.g. "Zulip Cloud") for the new AzureAD application,
|
|
|
|
choose "Integrate any other application you don't find in the
|
|
|
|
gallery (Non-gallery)" and click "Create".
|
|
|
|
|
|
|
|
1. From your new AzureAD application's Overview page that opens, go to
|
|
|
|
"Single sign-on" and select "SAML".
|
|
|
|
|
|
|
|
1. In the "Basic SAML Configuration" section:
|
|
|
|
|
2021-09-13 20:31:53 +02:00
|
|
|
* Set "Identifier (Entity ID)" to be `https://zulipchat.com`.
|
2021-09-08 19:38:37 +02:00
|
|
|
* Check the "Default" box - this is necessary for IdP-initiated sign on to work.
|
|
|
|
* Set `https://auth.zulipchat.com/complete/saml/` as the "Reply URL (Assertion Consumer Service URL)".
|
|
|
|
* Optional: If you want to set up IdP-initiated sign on, enter
|
|
|
|
`{"subdomain": "{your organization's subdomain}"}` in the
|
|
|
|
`RelayState` field. E.g. if your organization's
|
|
|
|
address is `mytestorganization.zulipchat.com`, set this field to
|
|
|
|
`{"subdomain": "mytestorganization"}`.
|
|
|
|
|
|
|
|
1. The default "User Attributes & Claims" are correct. If you need to
|
|
|
|
make changes to them, mention it in your email to support@zulip.com
|
|
|
|
in a later step. The screenshot below illustrates the expected
|
|
|
|
configuration - which is the default the new app comes with at the
|
|
|
|
time of writing this:
|
|
|
|
|
|
|
|
![AzureAD attributes](/static/images/help/azuread_saml_attrs.png)
|
|
|
|
|
|
|
|
1. The AzureAD side of configuration should be ready!
|
|
|
|
Send the following information to us at support@zulip.com:
|
|
|
|
* The URL of your zulipchat-hosted organization.
|
|
|
|
* The `App Federation Metadata Url` and the certificate
|
|
|
|
downloaded from `Certificate (Base64)` in the "SAML Signing Certificate" section.
|
|
|
|
* The `Login URL` and `Azure AD Identifier` from the "Set up" section.
|
|
|
|
* The name "X" that will be displayed on the "Log in with X"
|
|
|
|
button on the Zulip login page.
|
|
|
|
* Optionally, you can also send us an icon that should be shown on the button.
|
|
|
|
|
|
|
|
1. We will take care of the server-side setup and let you know as soon as it's ready.
|
|
|
|
|
2021-07-14 13:27:44 +02:00
|
|
|
## Configure SAML with Keycloak
|
|
|
|
|
|
|
|
1. Make sure you have created your organization.
|
2021-11-23 16:40:37 +01:00
|
|
|
|
2021-07-14 13:27:44 +02:00
|
|
|
1. Make sure your Keycloak server is up and running. We assume the URL
|
2021-10-19 21:26:58 +02:00
|
|
|
is `https://keycloak.example.com` and your Keycloak realm is `yourrealm`.
|
2021-11-23 16:40:37 +01:00
|
|
|
|
2021-07-14 13:27:44 +02:00
|
|
|
1. In Keycloak, register a new Client for your Zulip organization:
|
2021-09-13 20:31:53 +02:00
|
|
|
* Client-ID: `https://zulipchat.com`
|
2021-07-14 13:27:44 +02:00
|
|
|
* Client Protocol: `saml`
|
|
|
|
* Client SAML Endpoint: leave this field empty
|
2021-11-23 16:40:37 +01:00
|
|
|
|
2021-07-14 13:27:44 +02:00
|
|
|
1. In the `Settings` tab for your new Keycloak client, set the following properties:
|
|
|
|
- Valid Redirect URIs: `https://auth.zulipchat.com/*`
|
|
|
|
- Base URL: `https://auth.zulipchat.com/complete/saml/`
|
|
|
|
- Client Signature Required: `Disable`
|
2021-11-23 16:40:37 +01:00
|
|
|
|
2021-07-14 13:27:44 +02:00
|
|
|
1. In the `Mappers` tab for your new Keycloak client:
|
2021-09-10 22:11:52 +02:00
|
|
|
* Create a Mapper for first name:
|
2021-07-14 13:27:44 +02:00
|
|
|
* Property: `firstName`
|
|
|
|
* Friendly Name: `first_name`
|
|
|
|
* SAML Attribute Name: `first_name`
|
|
|
|
* SAML Attribute Name Format: `Basic`
|
2021-09-10 22:11:52 +02:00
|
|
|
* Create a Mapper for last name:
|
2021-07-14 13:27:44 +02:00
|
|
|
* Property: `lastName`
|
|
|
|
* Friendly Name: `last_name`
|
|
|
|
* SAML Attribute Name: `last_name`
|
|
|
|
* SAML Attribute Name Format: `Basic`
|
2021-09-10 22:11:52 +02:00
|
|
|
* Create a Mapper for email address:
|
2021-07-14 13:27:44 +02:00
|
|
|
* Property: `email`
|
|
|
|
* Friendly Name: `email`
|
|
|
|
* SAML Attribute Name: `email`
|
|
|
|
* SAML Attribute Name Format: `Basic`
|
|
|
|
|
|
|
|
1. The Keycloak side of configuration should be ready! Send the
|
|
|
|
following information to Zulip Support at support@zulip.com:
|
|
|
|
|
|
|
|
* The URL of your Zulip Cloud organization, i.e. `https://example.zulipchat.com`.
|
|
|
|
* The URL of your Keycloak realm. If `master` is your Keycloak
|
|
|
|
realm name, then the Keycloak realm URL should resemble
|
2021-10-19 21:26:58 +02:00
|
|
|
`https://keycloak.example.com/auth/realms/yourrealm`.
|
2021-07-14 13:27:44 +02:00
|
|
|
|
2021-09-08 19:38:37 +02:00
|
|
|
|
2020-08-11 01:47:54 +02:00
|
|
|
## Related articles
|
2020-04-30 15:15:38 +02:00
|
|
|
|
2021-10-23 15:18:32 +02:00
|
|
|
* [SAML configuration for self-hosting][saml-readthedocs]
|
|
|
|
* [SCIM provisioning](/help/scim)
|
2020-04-30 15:15:38 +02:00
|
|
|
|
|
|
|
[saml-readthedocs]: https://zulip.readthedocs.io/en/stable/production/authentication-methods.html#saml
|