import { faInfoCircle, faWarning } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal"; import { createNotification } from "@app/components/notifications"; import { OrgPermissionCan } from "@app/components/permissions"; import { Button, Switch, Tooltip } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects, useOrganization, useSubscription } from "@app/context"; import { useGetOIDCConfig, useLogoutUser, useUpdateOrg } from "@app/hooks/api"; import { useUpdateOIDCConfig } from "@app/hooks/api/oidcConfig/mutations"; import { usePopUp } from "@app/hooks/usePopUp"; import { OIDCModal } from "./OIDCModal"; export const OrgOIDCSection = (): JSX.Element => { const { currentOrg } = useOrganization(); const { subscription } = useSubscription(); const { data, isPending } = useGetOIDCConfig(currentOrg?.id ?? ""); const { mutateAsync } = useUpdateOIDCConfig(); const { mutateAsync: updateOrg } = useUpdateOrg(); const logout = useLogoutUser(); const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([ "addOIDC", "upgradePlan" ] as const); const handleOIDCToggle = async (value: boolean) => { try { if (!currentOrg?.id) return; if (!subscription?.oidcSSO) { handlePopUpOpen("upgradePlan"); return; } await mutateAsync({ organizationId: currentOrg?.id, isActive: value }); createNotification({ text: `Successfully ${value ? "enabled" : "disabled"} OIDC SSO`, type: "success" }); } catch (err) { console.error(err); } }; const handleEnforceOrgAuthToggle = async (value: boolean) => { try { if (!currentOrg?.id) return; if (!subscription?.oidcSSO) { handlePopUpOpen("upgradePlan"); return; } await updateOrg({ orgId: currentOrg?.id, authEnforced: value }); createNotification({ text: `Successfully ${value ? "enforced" : "un-enforced"} org-level auth`, type: "success" }); if (value) { await logout.mutateAsync(); window.open(`/api/v1/sso/oidc/login?orgSlug=${currentOrg.slug}`); window.close(); } } catch (err) { console.error(err); } }; const handleEnableBypassOrgAuthToggle = async (value: boolean) => { try { if (!currentOrg?.id) return; if (!subscription?.oidcSSO) { handlePopUpOpen("upgradePlan"); return; } await updateOrg({ orgId: currentOrg?.id, bypassOrgAuthEnabled: value }); createNotification({ text: `Successfully ${value ? "enabled" : "disabled"} admin bypassing of org-level auth`, type: "success" }); } catch (err) { console.error(err); } }; const handleOIDCGroupManagement = async (value: boolean) => { try { if (!currentOrg?.id) return; if (!subscription?.oidcSSO) { handlePopUpOpen("upgradePlan"); return; } await mutateAsync({ organizationId: currentOrg?.id, manageGroupMemberships: value }); createNotification({ text: `Successfully ${value ? "enabled" : "disabled"} OIDC group membership mapping`, type: "success" }); } catch (err) { console.error(err); } }; const addOidcButtonClick = async () => { if (subscription?.oidcSSO && currentOrg) { handlePopUpOpen("addOIDC"); } else { handlePopUpOpen("upgradePlan"); } }; return (
Manage OIDC authentication configuration
Allow members to authenticate into Infisical with OIDC
Enforce users to authenticate via OIDC to access this organization.
In case of a lockout, admins can use the{" "} Admin Login Portal {" "} at{" "} {window.location.origin}/login/admin
Allow organization admins to bypass OIDC enforcement when SSO is unavailable, misconfigured, or inaccessible.
When this feature is enabled, Infisical will automatically sync group memberships between the OIDC provider and Infisical. Users will be added to Infisical groups that match their OIDC group names, and removed from any Infisical groups not present in their groups claim. When enabled, manual management of Infisical group memberships will be disabled.
To use this feature you must include group claims in the OIDC token.
See your OIDC provider docs for details.
Infisical will manage user group memberships based on the OIDC provider