Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Add support for Auth0 SAML
Tuan Dangfaa6d1cf4035
diff --git a/backend/src/ee/routes/v1/saml-router.ts b/backend/src/ee/routes/v1/saml-router.tsindex b195d32b35..0b302c614d 100644--- a/backend/src/ee/routes/v1/saml-router.ts+++ b/backend/src/ee/routes/v1/saml-router.ts@@ -84,7 +84,7 @@ export const registerSamlRouter = async (server: FastifyZodProvider) => {samlConfig.audience = `spn:${ssoConfig.issuer}`;}}- if (ssoConfig.authProvider === SamlProviders.GOOGLE_SAML) {+ if (ssoConfig.authProvider === SamlProviders.GOOGLE_SAML || ssoConfig.authProvider === SamlProviders.AUTH0_SAML) {samlConfig.wantAssertionsSigned = false;}diff --git a/backend/src/ee/services/saml-config/saml-config-types.ts b/backend/src/ee/services/saml-config/saml-config-types.tsindex 96cb910357..03db4cfa1e 100644--- a/backend/src/ee/services/saml-config/saml-config-types.ts+++ b/backend/src/ee/services/saml-config/saml-config-types.ts@@ -6,7 +6,8 @@ export enum SamlProviders {AZURE_SAML = "azure-saml",JUMPCLOUD_SAML = "jumpcloud-saml",GOOGLE_SAML = "google-saml",- KEYCLOAK_SAML = "keycloak-saml"+ KEYCLOAK_SAML = "keycloak-saml",+ AUTH0_SAML = "auth0-saml"}export type TCreateSamlCfgDTO = {diff --git a/docs/documentation/platform/sso/auth0-saml.mdx b/docs/documentation/platform/sso/auth0-saml.mdxnew file mode 100644index 0000000000..567419a22b--- /dev/null+++ b/docs/documentation/platform/sso/auth0-saml.mdx@@ -0,0 +1,93 @@+---+title: "Auth0 SAML"+description: "Learn how to configure Auth0 SAML for Infisical SSO."+---++<Info>+ Auth0 SAML SSO feature is a paid feature. If you're using Infisical Cloud,+ then it is available under the **Pro Tier**. If you're self-hosting Infisical,+ then you should contact [email protected] to purchase an enterprise license+ to use it.+</Info>++<Steps>+ <Step title="Prepare the SAML SSO configuration in Infisical">+ In Infisical, head to your Organization Settings > Authentication > SAML SSO Configuration and select **Set up SAML SSO**.++ Next, note the **Application Callback URL** and **Audience** to use when configuring the Auth0 SAML application.++ ++ </Step>+ <Step title="Create a SAML application in Auth0">+ 2.1. In your Auth0, head to Applications and create an application.++ ++ Select **Regular Web Application** and press **Create**.++ ++ 2.2. In the Application head to Settings > Application URIs and add the **Application Callback URL** from step 1 into the **Allowed Callback URLs** field.++ ++ 2.3. In the Application head to Addons > SAML2 Web App and copy the **Issuer**, **Identity Provider Login URL**, and **Identity Provider Certificate** from the **Usage** tab.++ ++ 2.4. Back in Infisical, set **Issuer**, **Identity Provider Login URL**, and **Certificate** to the corresponding items from step 2.3.++ ++ 2.5. Back in Auth0, in the **Settings** tab, set the **Application Callback URL** to the **Application Callback URL** from step 1+ and update the **Settings** field with the JSON under the picture below (replacing `<audience-from-infisical>` with the **Audience** from step 1).++ ++ ```json+ {+ "audience": "<audience-from-infisical>",+ "mappings": {+ "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/email",+ "given_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/firstName",+ "family_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/lastName"+ },+ "signatureAlgorithm": "rsa-sha256",+ "digestAlgorithm": "sha256",+ "signResponse": true+ }+ ```++ Click **Save**.+ </Step>+ <Step title="Enable SAML SSO in Infisical">+ Enabling SAML SSO allows members in your organization to log into Infisical via Auth0.++ + </Step>+ <Step title="Enforce SAML SSO in Infisical">+ Enforcing SAML SSO ensures that members in your organization can only access Infisical+ by logging into the organization via Auth0.++ To enforce SAML SSO, you're required to test out the SAML connection by successfully authenticating at least one Auth0 user with Infisical;+ Once you've completed this requirement, you can toggle the **Enforce SAML SSO** button to enforce SAML SSO.+ </Step>++</Steps>++<Tip>+ If you are only using one organization on your Infisical instance, you can configure a default organization in the [Server Admin Console](../admin-panel/server-admin#default-organization) to expedite SAML login.+</Tip>++<Note>+ If you're configuring SAML SSO on a self-hosted instance of Infisical, make+ sure to set the `AUTH_SECRET` and `SITE_URL` environment variable for it to+ work:+ <div class="height:1px;"/>+ - `AUTH_SECRET`: A secret key used for signing and verifying JWT. This+ can be a random 32-byte base64 string generated with `openssl rand -base64+ 32`.+ <div class="height:1px;"/>+ - `SITE_URL`: The absolute URL of your self-hosted instance of Infisical including the protocol (e.g. https://app.infisical.com)+</Note>\ No newline at end of filediff --git a/docs/documentation/platform/sso/overview.mdx b/docs/documentation/platform/sso/overview.mdxindex 227a7502f3..0d4b8da899 100644--- a/docs/documentation/platform/sso/overview.mdx+++ b/docs/documentation/platform/sso/overview.mdx@@ -28,6 +28,7 @@ Infisical supports these and many other identity providers:- [JumpCloud SAML](/documentation/platform/sso/jumpcloud)- [Keycloak SAML](/documentation/platform/sso/keycloak-saml)- [Google SAML](/documentation/platform/sso/google-saml)+- [Auth0 SAML](/documentation/platform/sso/auth0-saml)- [Keycloak OIDC](/documentation/platform/sso/keycloak-oidc)- [Auth0 OIDC](/documentation/platform/sso/auth0-oidc)- [General OIDC](/documentation/platform/sso/general-oidc)diff --git a/docs/images/sso/auth0-saml/auth0-config-2.png b/docs/images/sso/auth0-saml/auth0-config-2.pngnew file mode 100644index 0000000000..1fbc683636Binary files /dev/null and b/docs/images/sso/auth0-saml/auth0-config-2.png differdiff --git a/docs/images/sso/auth0-saml/auth0-config-3.png b/docs/images/sso/auth0-saml/auth0-config-3.pngnew file mode 100644index 0000000000..f4287e51a5Binary files /dev/null and b/docs/images/sso/auth0-saml/auth0-config-3.png differdiff --git a/docs/images/sso/auth0-saml/auth0-config.png b/docs/images/sso/auth0-saml/auth0-config.pngnew file mode 100644index 0000000000..6fca6247dbBinary files /dev/null and b/docs/images/sso/auth0-saml/auth0-config.png differdiff --git a/docs/images/sso/auth0-saml/create-application-2.png b/docs/images/sso/auth0-saml/create-application-2.pngnew file mode 100644index 0000000000..71990fbef1Binary files /dev/null and b/docs/images/sso/auth0-saml/create-application-2.png differdiff --git a/docs/images/sso/auth0-saml/create-application.png b/docs/images/sso/auth0-saml/create-application.pngnew file mode 100644index 0000000000..c113d2dda0Binary files /dev/null and b/docs/images/sso/auth0-saml/create-application.png differdiff --git a/docs/images/sso/auth0-saml/enable-saml.png b/docs/images/sso/auth0-saml/enable-saml.pngnew file mode 100644index 0000000000..bb084ebac0Binary files /dev/null and b/docs/images/sso/auth0-saml/enable-saml.png differdiff --git a/docs/images/sso/auth0-saml/infisical-config.png b/docs/images/sso/auth0-saml/infisical-config.pngnew file mode 100644index 0000000000..07a7cdc74aBinary files /dev/null and b/docs/images/sso/auth0-saml/infisical-config.png differdiff --git a/docs/images/sso/auth0-saml/init-config.png b/docs/images/sso/auth0-saml/init-config.pngnew file mode 100644index 0000000000..5ab5a01e53Binary files /dev/null and b/docs/images/sso/auth0-saml/init-config.png differdiff --git a/docs/mint.json b/docs/mint.jsonindex 69ad84f111..5d06a10f97 100644--- a/docs/mint.json+++ b/docs/mint.json@@ -248,6 +248,7 @@"documentation/platform/sso/jumpcloud","documentation/platform/sso/keycloak-saml","documentation/platform/sso/google-saml",+ "documentation/platform/sso/auth0-saml","documentation/platform/sso/keycloak-oidc","documentation/platform/sso/auth0-oidc","documentation/platform/sso/general-oidc"diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgAuthTab/SSOModal.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgAuthTab/SSOModal.tsxindex eab111c154..9bb793c804 100644--- a/frontend/src/pages/organization/SettingsPage/components/OrgAuthTab/SSOModal.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/OrgAuthTab/SSOModal.tsx@@ -25,7 +25,8 @@ enum AuthProvider {AZURE_SAML = "azure-saml",JUMPCLOUD_SAML = "jumpcloud-saml",KEYCLOAK_SAML = "keycloak-saml",- GOOGLE_SAML = "google-saml"+ GOOGLE_SAML = "google-saml",+ AUTH0_SAML = "auth0-saml"}const ssoAuthProviders = [@@ -33,7 +34,8 @@ const ssoAuthProviders = [{ label: "Azure / Entra SAML", value: AuthProvider.AZURE_SAML },{ label: "JumpCloud SAML", value: AuthProvider.JUMPCLOUD_SAML },{ label: "Keycloak SAML", value: AuthProvider.KEYCLOAK_SAML },- { label: "Google SAML", value: AuthProvider.GOOGLE_SAML }+ { label: "Google SAML", value: AuthProvider.GOOGLE_SAML },+ { label: "Auth0 SAML", value: AuthProvider.AUTH0_SAML }];const schema = z@@ -191,6 +193,15 @@ export const SSOModal = ({ popUp, handlePopUpClose, handlePopUpToggle, hideDeletissuer: "Issuer",issuerPlaceholder: window.origin};+ case AuthProvider.AUTH0_SAML:+ return {+ acsUrl: "Application Callback URL",+ entityId: "Audience",+ entryPoint: "Identity Provider Login URL",+ entryPointPlaceholder: "https://xxx.auth0.com/samlp/xxx",+ issuer: "Issuer",+ issuerPlaceholder: "urn:xxx-xxx.us.auth0.com"+ };default:return {acsUrl: "ACS URL",