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
update doc
Thiago Araujo da Silvabd5690b738c6
diff --git a/backend/src/ee/services/audit-log/audit-log-types.ts b/backend/src/ee/services/audit-log/audit-log-types.tsindex 857879fe31..02562832d1 100644--- a/backend/src/ee/services/audit-log/audit-log-types.ts+++ b/backend/src/ee/services/audit-log/audit-log-types.ts@@ -3731,7 +3731,7 @@ interface OrgAdminBypassSSOEvent {metadata: Record<string, string>; // no metadata yet}-type TMfaSatisfiedBy = "not-required" | "infisical" | "idp";+export type TMfaSatisfiedBy = "not-required" | "infisical" | "idp";interface UserLoginEvent {type: EventType.USER_LOGIN;diff --git a/backend/src/services/auth/auth-fns.test.ts b/backend/src/services/auth/auth-fns.test.tsindex 0adb2b745c..684ffa048f 100644--- a/backend/src/services/auth/auth-fns.test.ts+++ b/backend/src/services/auth/auth-fns.test.ts@@ -15,24 +15,16 @@ describe("OAuth login method policy", () => {[AuthMethod.GITLAB, LoginMethod.GITLAB]] as const)("allows %s when it is enabled", (authMethod, loginMethod) => {expect(isOAuthLoginMethodDisabled(authMethod, [loginMethod])).toBe(false);- expect(() =>- assertOAuthLoginMethodEnabled({- authMethod,- enabledLoginMethods: [loginMethod]- })- ).not.toThrow();+ expect(() => assertOAuthLoginMethodEnabled({ authMethod, enabledLoginMethods: [loginMethod] })).not.toThrow();});test.each([AuthMethod.GOOGLE, AuthMethod.GITHUB, AuthMethod.GITLAB] as const)("rejects disabled %s login before a user exists",(authMethod) => {expect(isOAuthLoginMethodDisabled(authMethod, [LoginMethod.EMAIL])).toBe(true);- expect(() =>- assertOAuthLoginMethodEnabled({- authMethod,- enabledLoginMethods: [LoginMethod.EMAIL]- })- ).toThrow(/disabled by administrator/);+ expect(() => assertOAuthLoginMethodEnabled({ authMethod, enabledLoginMethods: [LoginMethod.EMAIL] })).toThrow(+ /disabled by administrator/+ );});@@ -48,10 +40,7 @@ describe("OAuth login method policy", () => {test("treats an unset allowlist as all methods enabled", () => {expect(() =>- assertOAuthLoginMethodEnabled({- authMethod: AuthMethod.GOOGLE,- enabledLoginMethods: null- })+ assertOAuthLoginMethodEnabled({ authMethod: AuthMethod.GOOGLE, enabledLoginMethods: null })).not.toThrow();});});diff --git a/backend/src/services/auth/auth-fns.ts b/backend/src/services/auth/auth-fns.tsindex dd75020f76..8e7cee9c4e 100644--- a/backend/src/services/auth/auth-fns.ts+++ b/backend/src/services/auth/auth-fns.ts@@ -100,15 +100,11 @@ export const isMfaProofAccepted = (proven: string | null | undefined, acceptedMeexport const extractBearerToken = (token?: string): string => {if (!token) {- throw new UnauthorizedError({- message: "Missing Authorization Header in the request header."- });+ throw new UnauthorizedError({ message: "Missing Authorization Header in the request header." });}const [authTokenType, authTokenValue] = token.split(" ", 2) as [string, string];if (!authTokenType) {- throw new UnauthorizedError({- message: "Missing Authorization Header in the request header."- });+ throw new UnauthorizedError({ message: "Missing Authorization Header in the request header." });}if (authTokenType.toLowerCase() !== "bearer") {throw new UnauthorizedError({diff --git a/backend/src/services/auth/auth-login-service.ts b/backend/src/services/auth/auth-login-service.tsindex a95cb832b1..eb99a81daf 100644--- a/backend/src/services/auth/auth-login-service.ts+++ b/backend/src/services/auth/auth-login-service.ts@@ -8,7 +8,7 @@ import {TUsers,UserDeviceSchema} from "@app/db/schemas";-import { EventType, TAuditLogServiceFactory } from "@app/ee/services/audit-log/audit-log-types";+import { EventType, TAuditLogServiceFactory, TMfaSatisfiedBy } from "@app/ee/services/audit-log/audit-log-types";import { OrgPermissionSsoActions, OrgPermissionSubjects } from "@app/ee/services/permission/org-permission";import { isAuthMethodSaml } from "@app/ee/services/permission/permission-fns";import { TPermissionServiceFactory } from "@app/ee/services/permission/permission-service-types";@@ -1331,7 +1331,7 @@ export const authLoginServiceFactory = ({}const { isMfaRequired, requiredMfaMethod } = getRequiredMfaMethod(rootOrg, user);- // The MFA policy belongs to the root org, so switching between it and its sub-orgs is not a change.+ // The MFA policy belongs to the root org, so moving between a root org and its sub-orgs is not a change.const hasOrganizationChanged = actorRootOrgId ? actorRootOrgId !== rootOrg.id : false;const hasMfaMethodChanged = mfaMethod !== requiredMfaMethod;// Checked on every selection so turning the trust off applies at the next switch. While the org enforces@@ -1371,7 +1371,7 @@ export const authLoginServiceFactory = ({idpMfaOrgId});- let mfaSatisfiedBy: "not-required" | "infisical" | "idp" = "infisical";+ let mfaSatisfiedBy: TMfaSatisfiedBy = "infisical";if (!isMfaRequired) mfaSatisfiedBy = "not-required";else if (isMfaSatisfiedByIdp) mfaSatisfiedBy = "idp";diff --git a/backend/src/services/auth/idp-mfa-signal.ts b/backend/src/services/auth/idp-mfa-signal.tsindex c345cd827d..3bdc294232 100644--- a/backend/src/services/auth/idp-mfa-signal.ts+++ b/backend/src/services/auth/idp-mfa-signal.ts@@ -1,15 +1,15 @@// "amr" is the OIDC Core claim name. SAML has no standard attribute name, so the Okta convention is the default.-export const DEFAULT_MFA_CLAIM_NAME = "amr";+const DEFAULT_MFA_CLAIM_NAME = "amr";// RFC 8176 value for a completed multi-factor login; Okta, Entra ID, Auth0, Google and Duo all emit it.-export const DEFAULT_OIDC_MFA_CLAIM_VALUES = ["mfa"];+const DEFAULT_OIDC_MFA_CLAIM_VALUES = ["mfa"];// Only classes whose definition asserts two factors: SmartcardPKI is a card plus a PIN and TimeSyncToken a// PIN plus a token code, alongside MobileTwoFactorContract, the REFEDS MFA profile and Entra ID's// satisfied-MFA class. Possession-only classes such as Smartcard and SoftwarePKI, and single-factor ones such// as PasswordProtectedTransport and MobileTwoFactorUnregistered, are deliberately absent; an org that knows// its IdP only issues them after MFA adds them to `mfaAuthnContexts`.-export const DEFAULT_SAML_MFA_AUTHN_CONTEXTS = [+const DEFAULT_SAML_MFA_AUTHN_CONTEXTS = ["urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorContract","urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken","urn:oasis:names:tc:SAML:2.0:ac:classes:SmartcardPKI",@@ -32,17 +32,17 @@ export type TIdpMfaSignal = {received: string[];};-export type TSamlMfaSignalConfig = {+type TSamlMfaSignalConfig = {mfaSignalAttribute?: string | null;mfaAuthnContexts?: string[] | null;};-export type TOidcMfaSignalConfig = {+type TOidcMfaSignalConfig = {mfaClaimName?: string | null;mfaAmrValues?: string[] | null;};-export type TIdpMfaSignalInput =+type TIdpMfaSignalInput =| {kind: "saml";authnContextClassRefs: string[];diff --git a/docs/documentation/platform/mfa.mdx b/docs/documentation/platform/mfa.mdxindex 939b0ef0af..0a82b5640b 100644--- a/docs/documentation/platform/mfa.mdx+++ b/docs/documentation/platform/mfa.mdx@@ -19,7 +19,7 @@ You can use any mobile authenticator app (Authy, Google Authenticator, Duo, etc.## MFA for SSO logins-If your organization enforces MFA and your users sign in through [SAML or OIDC SSO](/documentation/platform/sso/overview), you can let the MFA they completed at your identity provider count, so Infisical doesn't prompt them again. Password and LDAP logins are always prompted, so a break-glass account keeps Infisical MFA. The setting only covers the MFA your organization enforces. A user who turned on MFA for their own account is still prompted.+If your organization enforces MFA and your users sign in through [SAML or OIDC SSO](/documentation/platform/sso/overview), you can let the MFA they completed at your identity provider count, so Infisical doesn't prompt them again. Password, LDAP, and Google, GitHub, or GitLab logins are always prompted, so a break-glass account keeps Infisical MFA. The setting only takes effect while your organization enforces MFA, and then it also covers users who turned on MFA for their own account.Infisical trusts a login only if the identity provider's signed response says MFA was completed:diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/SSOModal.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/SSOModal.tsxindex 3a67162046..d26af2bc6f 100644--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/SSOModal.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/SSOModal.tsx@@ -187,8 +187,6 @@ type Props = {hideDelete?: boolean;};-// Labels read as the provider's console names them, with the generic SAML term in parentheses when the-// provider's label hides it.const withHint = (label: string, hint?: string) => (hint ? `${label} (${hint})` : label);export const SSOModal = ({ popUp, handlePopUpClose, handlePopUpToggle, hideDelete }: Props) => {