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 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://app.readthedocs.com/accounts/saml/<organization-slug>/acs/ (replace <organization-slug> with your organization slug)

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

    • Name ID format: EmailAddress

    • Application username: Email

    • 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.

Enable SAML on your Read the Docs organization

Once you have created the SAML application in Okta, you need to enable SAML on Read the Docs.

  1. Copy the Metadata URL from the Okta application you just created.

    • On Okta, click on the Applications.

    • Click on the Read the Docs application.

    • Click on the Sign On tab.

    • Copy the Metadata URL.

  2. Go you your organization’s SAML settings page.

  3. Paste the Metadata URL in the Metadata URL field.

  4. Leave the domain field empty.

  5. Click Save.

Attaching the email domain your organization uses to enforce SAML is currently done by the Read the Docs team, contact support using an account that’s an owner of the organization.

Configure a team for users to join automatically

After you have enabled SAML on your organization, a team named “SAML Users” will be created automatically, and all users that sign up with SAML will be automatically joined to this team. You can delete this team, or configure a different team or teams for users to join automatically.

To configure a team for users to join automatically:

  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

User management

New users

After enabling the SAML integration, all users with an email domain matching the one in your SAML integration will be required to sign up using SAML. After they sign up, they will be automatically joined to your organization within the teams you have configured to auto-join users.

Existing users

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

If you want to enforce SAML for existing users, you have the following options:

  • Users can delete their accounts, and sign up again using SAML.

  • Users can link their existing accounts to their SAML identity by following this link while logged in their Read the Docs account: https://app.readthedocs.com/accounts/saml/<organization-slug>/login/?process=connect (replace <organization-slug> with your organization slug). You can find this link in your organization’s SAML settings page.

Outside collaborators

You can still add outside collaborators that don’t use SAML 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.

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 their 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