Navigation

Configure Federated Authentication from Okta

This guide shows you how to configure federated authentication using Okta as your IdP.

After integrating Okta and Atlas, you can use your company’s credentials to log in to Atlas and other MongoDB cloud services.

Note

If you are using Okta’s built-in MongoDB Cloud app, you can use Okta’s documentation.

If you are creating your own SAML app, use the procedures described here.

Prerequisites

To use Okta as an IdP for Atlas, you must have:

Procedures

Throughout the following procedure, it is helpful to have one browser tab open to your Atlas Federation Management Console and one tab open to your Okta account.

Configure Okta as an Identity Provider

1

Add a new application to your Okta account

  1. In the Okta top navigation, click the Applications tab.
  2. Click the Add Application button.
  3. Click the Create New App button.
  4. Select Web for the Platform field.
  5. Select SAML 2.0 for the Sign on method field.
  6. Click the Create button.
2

Create Okta SAML integration

  1. Fill in the App name text field with your desired application name.
  2. Optionally, add a logo image and set app visibility.
  3. Click the Next button.
3

Download Okta certificate

  1. Click the Download Okta Certificate button.
  2. Rename the downloaded file to have a .cer extension instead of .cert.
4
5

Create a new Identity Provider

  1. In the FMC dashboard, click the Manage Identity Providers button.
  2. Click the Setup Identity Provider button.
6

Enter SAML settings

  1. In the FMC dashboard, fill in the data fields with the following values:

    Field Value
    Configuration Name A descriptive name of your choosing.
    Login URL

    Enter a URL to serve as the Atlas login page. Give this URL to your users to have them bypass the main Atlas login page where they enter their username. This URL redirects users to the IdP Single Sign-On URL.

    Note

    The Login URL must be unique across MongoDB cloud services.

    Issuer URI and Single Sign-On URL Click the Fill With Placeholder Values button to the right of the text fields. You will get the real values from Okta in a later step.
    Identity Provider Signature Certificate Click the Choose File button to upload the .cer file you received from Okta earlier.
    Request Binding HTTP POST
    Response Signature Algorithm SHA-256
    Apply to Organizations Select organizations to connect to this IdP. When users authenticate through Okta for the first time, Atlas grants them membership in the selected organizations. Manage organization mapping to choose what role these users have within the selected organizations.
  2. Click the Next button.

7

Create SAML Integration

  1. In this step, copy values from the Atlas FMC to the Okta Create SAML Integration page.

    Okta Data Field Value
    Single sign on URL

    Use the Assertion Consumer Service URL from the Atlas FMC.

    Checkboxes:

    • Use this for Recipient URL and Destination URL: checked
    • Allow this app to request other SSO URLs: unchecked
    Audience URI (SP Entity ID) Use the Audience URI from the Atlas FMC.
    Default RelayState Leave blank.
    Name ID format Unspecified
    Application username Email
    Update application username on Create and update
  2. Click the Click Show Advanced Settings link in the Okta configuration page and ensure that the following values are set:

    Okta Data Field Value
    Response Signed
    Assertion Signature Signed
    Signature Algorithm RSA-SHA256
    Digest Algorithm SHA256
    Assertion Encryption Unencrypted
  3. Leave the remaining Advanced Settings fields in their default state.

  4. Scroll down to the Attribute Statements (Optional) section and create three attributes with the following values:

    Name Name Format Value
    email Unspecified user.email
    firstName Unspecified user.firstName
    lastName Unspecified user.lastName

    Important

    The values in the Name column are case-sensitive. Enter them exactly as shown.

    Note

    These values may be different if Okta is connected to an Active Directory. For the appropriate values, use the Active Directory fields that contain a user’s first name, last name, and full email address.

  5. Click the Next button in the Okta configuration.

  6. Select the radio button marked I’m an Okta customer adding an internal app.

  7. Click the Finish button.

8

Copy information back to the Atlas FMC

  1. On the Okta application page, click the View Setup Instructions button in the middle of the page.

    Note

    The Okta setup instructions appear in a new browser tab.

  2. In the Atlas FMC, click the Finish button to return to the Identity Providers page. Click the Modify button for your newly created IdP.

  3. Fill in the following text fields:

    FMC Data Field Value
    Issuer URI Use the Identity Provider Issuer value from the Okta Setup Instructions page.
    Single Sign-on URL Use the Identity Provider Single Sign-On URL value from the Okta Setup Instructions page.
  4. Close the Okta setup instructions browser tab.

  5. Click the Next button on the Atlas FMC page.

  6. Click the Finish button the FMC Edit Identity Provider page.

9

Assign users to your Okta application

  1. On the Okta application page, click the Assignments tab.
  2. Ensure that all your Atlas organization users who will use the Okta service are enrolled.

Map your Domain

Mapping your domain to the IdP lets Atlas know that users from your domain should be directed to the Login URL you provide.

When users visit the Atlas login page, they enter their email address. If the email domain is associated with an IdP, they are sent to the custom Login URL for that IdP.

Note

If more than one IdP is associated with your domain, users will need to navigate to the correct Login URL manually.

Use the Federation Management Console to map your domain to the IdP:

1

Open the Federation Management Console.

  1. Log in to Atlas.
  2. Use the dropdown at the top-left of Atlas to select the organization for which you want to manage federation settings.
  3. Click Settings in the left navigation pane.
  4. In Manage Federation Settings, click Visit Federation Management App.
2

Enter domain mapping information.

  1. Click Add a Domain.

  2. On the Domains screen, click Add Domain.

  3. Enter the following information for your domain mapping:

    Field Description
    Display Name Name to easily identify the domain.
    Domain Name Domain name to map.
  4. Click Next.

3

Choose how to verify your domain.

Note

You can choose the verification method once. It cannot be modified. To select a different verification method, delete and recreate the domain mapping.

Select the appropriate tab based on whether you are verifying your domain by uploading an HTML file or creating a DNS TXT record:

Upload an HTML file containing a verification key to verify that you own your domain.

  1. Click HTML File Upload.
  2. Click Next.
  3. Download the mongodb-site-verification.html file that Atlas provides.
  4. Upload the HTML file to a web site on your domain. You must be able to access the file at <https://host.domain>/mongodb-site-verification.html.
  5. Click Finish.

Create a DNS TXT record with your domain provider to verify that you own your domain. Each DNS record associates a specific Atlas organization with a specific domain.

  1. Click DNS Record.

  2. Click Next.

  3. Copy the provided TXT record. The TXT record has the following form:

    mongodb-site-verification=<32-character string>
    
  4. Log in to your domain name provider (such as GoDaddy.com or networksolutions.com).

  5. Add the TXT record that Atlas provides to your domain.

  6. Return to Atlas and click Finish.

4

Verify your domain.

The Domains screen displays both unverified and verified domains you’ve mapped to your IdP. To verify your domain, click the target domain’s Verify button. Atlas shows whether the verification succeeded in a banner at the top of the screen.

Associate Your Domain with Your Identity Provider

After successfully verifying your domain, use the Federation Management Console to associate the domain with Okta:

1

Click Identity Providers in the left navigation.

2

For the IdP you want to associate with your domain, click pencil icon next to Associated Domains.

3

Select the domain you want to associate with the IdP.

4

Click Confirm.

Test Your Domain Mapping

Important

Before you begin testing, copy and save the Bypass SAML Mode URL for your IdP. Use this URL to bypass federated authentication in the event that you are locked out of your Atlas organization.

While testing, keep your session logged in to the Federation Management Console to further ensure against lockouts.

To learn more about Bypass SAML Mode, see Bypass SAML Mode.

Use the Federation Management Console to test the integration between your domain and Okta:

1

In a private browser window, navigate to the Atlas log in page.

2

Enter a username (usually an email address) with your verified domain.

Example

If your verified domain is mongodb.com, enter alice@mongodb.com.

3

Click Next.

If you mapped your domain correctly, you’re redirected to your IdP to authenticate. If authenticating with your IdP succeeds, you’re redirected back to Atlas.

Note

You can bypass the Atlas log in page by navigating directly to your IdP’s Login URL. The Login URL takes you directly to your IdP to authenticate.

Map an Organization

Use the Federation Management Console to assign your domain’s users access to specific Atlas organizations:

1

Open the Federation Management Console.

  1. Log in to Atlas.
  2. Use the dropdown at the top-left of Atlas to select the organization for which you want to manage federation settings.
  3. Click Settings in the left navigation pane.
  4. In Manage Federation Settings, click Visit Federation Management App.
2

Connect an organization to the Federation Application.

  1. Click View Organizations.

    Atlas displays all organizations where you are an Organization Owner.

    Organizations which are not already connected to the Federation Application have Connect button in the Actions column.

  2. Click the desired organization’s Connect button.

3

Apply an Identity Provider to the organization.

From the Organizations screen in the management console:

  1. Click the Name of the organization you want to map to an IdP.

  2. On the Identity Provider screen, click Apply Identity Provider.

    Atlas directs you to the Identity Providers screen which shows all IdPs you have linked to Atlas.

  3. For the IdP you want to apply to the organization, click Modify.

  4. At the bottom of the Edit Identity Provider form, select the organizations to which this IdP applies.

  5. Click Next.

  6. Click Finish.

4

Connect an organization to the Federation Application.

  1. Click Organizations in the left navigation.
  2. In the list of Organizations, ensure that your desired organization(s) now have the expected Identity Provider.

(Optional) Select a Default User Role for the Organization

Use the Federation Management Console to grant users who authenticate through Okta a default role in a mapped organization. You can select different roles for different organizations.

Note

The selected role only applies to users who authenticate through Okta if they do not already have a role in the organization.

1

In the Federation Management Console, click Organizations in the left navigation.

2

Click the Name of the organization for which you want to assign default permissions.

3

In the Default User Role dropdown, select the desired role. To remove a default user role, click the times circle icon next to the dropdown.

Sign in to Atlas Using Your Login URL

All users you assigned to the Okta application can log in to Atlas using their Okta credentials on the Login URL. Users have access to the organizations you mapped to your IdP.

Note

If more than one IdP is associated with your domain, users will need to navigate to the correct Login URL manually.

If you selected a default organization role, new users who log in to Atlas using the Login URL have the role you specified.