How to set up Single Sign-On (SSO) with SAML

Note

This feature is only available on Read the Docs for Business.

Note

This feature is in beta, and will be available for Enterprise plans only. Contact support to enable this feature for your organization.

At the moment only Okta is supported as a SAML identity provider.

This how-to guide will provide instructions on how to enable SSO using Okta as a SAML identity provider. If you want more information on this feature, please read Single Sign-On (SSO)

Prerequisites

Organization permissions

To change your Organization’s settings, you need to be an owner of that organization.

You can validate your ownership of the Organization with these steps:

  1. Navigate to the organization management page.

  2. Look at the Owners section on the right menu.

If you’d like to modify this setting and are not an owner, you can ask an existing organization owner to take the actions listed.

Create a new SAML application in Okta

In order to enable SSO with Okta, you need to create a new SAML application in your Okta account.

  1. Log in to your Okta account.

  2. Click on Applications.

  3. Click on Create App Integration.

  4. Choose SAML 2.0, and click Next.

  5. Fill in the following fields with the information from your SAML integration:

    • App name: Read the Docs

    • App logo: Optionally you can use the Read the Docs logo.

    • App visibility: (optional)

    • Single Sign On URL: https://readthedocs.com/accounts/saml/<organization-slug>/acs/ (replace <organization-slug> with your organization slug)

    • Audience URI (SP Entity ID): https://readthedocs.com/accounts/saml/<organization-slug>/metadata/ (replace <organization-slug> with your organization slug)

    • Name ID format: EmailAddress

    • Leave the rest of the fields as default.

  6. Add the following “attribute statements” to be used when creating a new user:

    Name

    Format

    Value

    user.id

    Basic

    user.id

    user.firstName

    Basic

    user.firstName

    user.lastName

    Basic

    user.lastName

  7. Click Next.

  8. Select This is an internal app that we have created.

  9. Click Finish.

User setup

Using this setup, all users who have access to the configured Okta application will automatically join to your Read the Docs organization when they sign up. Existing users will not be automatically joined to the organization.

You can still add outside collaborators and manage their access. There are two ways to manage this access:

  • Using teams to provide access for ongoing contribution.

  • Using sharing to provide short-term access requiring a login.

Enabling SSO

Enabling SSO is currently done by the Read the Docs team, contact support to enable this feature for your organization.

By default, users that sign up with SAML do not have any permissions over any project. However, you can define which teams users will auto-join when they sign up.

After enabling the SAML integration, all users with email addresses from your configured domain will be required to signup using SAML.

Warning

Existing users with email addresses from your configured domain will not be required to sign up using SAML, but they won’t be automatically joined to your organization.

Configure team for all users to join

You can mark one or more teams that users will automatically join when they sign up with a matching email address. Configure this option by:

  1. Navigate to the teams management page.

  2. Click the <team name>.

  3. Click Edit team

  4. Enable Auto join users with an organization’s email address to this team.

  5. Click Save

With this enabled, all users that sign up with SAML will automatically join this team. These teams can have either read-only or admin permissions over a set of projects.

Revoke user’s access to all the projects

By disabling access to the SAML integration to a user, you revoke access to all the projects the linked Read the Docs user had access to, and disable login on Read the Docs completely for that user.

Warning

If the user signed up to Read the Docs previously to enabling SAML on your organization, they may still have access to their account and projects if they were manually added to a team.

To completely revoke access to a user, remove them from all the teams they are part of.

Warning

If the user was already signed in to Read the Docs when their access was revoked, they may still have access to documentation pages until their session expires. This is three days for the dashboard and documentation pages.

To completely revoke access to a user, remove them from all the teams they are part of.

See also

How to manage Read the Docs teams

Additional user management options

Single Sign-On (SSO)

Information about choosing a Single Sign-on approach