Skip to content

triauth for ZulipOIDC

Let your team into Zulip with one approval on their own device, and no Zulip passwords.

  • Chat
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every self-hosted server, and the Plus plan of Zulip Cloud
Set up in
/etc/zulip/settings.py

About Zulip

Zulip is a team chat where every conversation has a topic, so people catch up on a busy channel without reading everything. Companies, open-source communities, and research groups use it as a cloud service or on their own server.

Connect Zulip to triauth

Zulip signs people in through the triauth OpenID Connect bridge. Once connected, Zulip's sign-in page shows a button with your domain's name. People on your team click it, type their username, and approve on their own device. Nobody keeps a Zulip password, and when someone leaves, removing their identity records at your domain ends their access to Zulip as well.

How it works

  1. Open oidc.triauth.org and enter your domain. Paste Zulip's redirect address, https://zulip.example.com/complete/oidc/ with your own Zulip address in place of zulip.example.com, and click Connect app. The bridge gives you a client ID and a client secret.

  2. On your Zulip server, add the settings below to /etc/zulip/settings.py, with your domain in place of example.com and the client ID in place of its placeholder.

    python
    AUTHENTICATION_BACKENDS = (
        "zproject.backends.GenericOpenIdConnectBackend",
        # keep the other methods you use, such as EmailAuthBackend
    )
    
    SOCIAL_AUTH_OIDC_ENABLED_IDPS = {
        "triauth": {
            "oidc_url": "https://oidc.triauth.org/example.com",
            "display_name": "example.com",
            "client_id": "<client ID from the bridge>",
            "secret": get_secret("social_auth_oidc_secret"),
            "auto_signup": True,
        }
    }

    Put the client secret into /etc/zulip/zulip-secrets.conf as social_auth_oidc_secret = <client secret from the bridge>, then restart Zulip.

  3. As an organization owner, open the gear menu, then Organization settings › Authentication methods, turn on OpenID Connect, and save.

  4. Open Zulip's sign-in page and click the button with your domain's name.

Checkpoint

Zulip's sign-in page shows a new button with your domain's name. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve.

Good to know

  • With auto_signup on, everyone with an identity at your domain gets a Zulip account the first time they sign in. Without it, Zulip asks them whether to create one. To let only one team in, limit the app to a group when you connect it.
  • People who already have a Zulip account under the same email address sign in to it.
  • Zulip fills its groups only from a claim in its own format, so the groups published at your domain are not used for that.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-zulip>/complete/oidc/
Where in Zulip/etc/zulip/settings.py and /etc/zulip/zulip-secrets.conf, then the organization's Authentication methods
Addressoidc_url takes the issuer, https://oidc.triauth.org/<your domain>, and Zulip reads the rest from the discovery document
IdentityZulip knows people by email address, which is the identifier
GroupsZulip reads group membership from a zulip_groups claim, which the bridge does not send

Zulip keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. The OpenID Connect section of Zulip's authentication guide explains every setting.

Next steps

All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.