In this guide, we will use Okta as the SSO provider and with the Security Assertion Markup Language (SAML) protocol as our preferred identity protocol.
We currently only support SP-initiated authentication. IdP-initiated login and user provisioning is not supported at this time.
Open a new tab/window in your browser and sign in to your Okta account.
Navigate to “Admin/Applications” and click the “Create App Integration” button.
Then choose an “SAML 2.0” application and click “Create”.
Open a new tab/window in your browser and navigate to the SSO section of your organization’s settings. Select the SAML protocol.
Copy the “Assertion Consumer Service URL” from the organization’s settings on Hugging Face, and paste it in the “Single sign-on URL” field on Okta.
The URL looks like this: https://huggingface.co/organizations/[organizationIdentifier]/saml/consume
.
On Okta, set the following settings:
Save your new application.
In your Okta application, under “Sign On/Settings/More details”, find the following fields:
In the SSO section of your organization’s settings, copy-paste these values from Okta:
The public certificate must have the following format:
-----BEGIN CERTIFICATE-----
{certificate}
-----END CERTIFICATE-----
You can now click on “Update and Test SAML configuration” to save the settings.
You should be redirected to your SSO provider (IdP) login prompt. Once logged in, you’ll be redirected to your organization’s settings page.
A green check mark near the SAML selector will attest that the test was successful.
Now that Single Sign-On is configured and tested, you can enable it for members of your organization by clicking on the “Enable” button.
Once enabled, members of your organization must complete the SSO authentication flow described in the How does it work? section.