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
fix: create saml config if non-existant prior to opening modal
Scott Wilson840013fe1707
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSsoTab.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSsoTab.tsxindex 5c2819cd90..d7cc99e7eb 100644--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSsoTab.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSsoTab.tsx@@ -60,6 +60,7 @@ import {import { withPermission } from "@app/hoc";import { usePopUp } from "@app/hooks";import {+ useCreateSSOConfig,useGetEmailDomains,useGetLDAPConfig,useGetOIDCConfig,@@ -114,6 +115,7 @@ export const OrgSsoTab = withPermission(} | null>(null);const { mutateAsync: updateSamlAsync } = useUpdateSSOConfig();+ const { mutateAsync: createSamlAsync, isPending: isCreatingSamlConfig } = useCreateSSOConfig();const { mutateAsync: updateOidcAsync } = useUpdateOIDCConfig();const { mutateAsync: updateLdapAsync } = useUpdateLDAPConfig();@@ -171,11 +173,22 @@ export const OrgSsoTab = withPermission(shouldDisplaySection(LoginMethod.OIDC) ||shouldDisplaySection(LoginMethod.LDAP);- const handleConnectSaml = () => {+ const handleConnectSaml = async () => {if (!subscription?.samlSSO) {handlePopUpOpen("upgradePlan", { featureName: "SAML SSO" });return;}+ if (!currentOrg) return;+ if (!samlConfig) {+ await createSamlAsync({+ organizationId: currentOrg.id,+ authProvider: "okta-saml",+ isActive: false,+ entryPoint: "",+ issuer: "",+ cert: ""+ });+ }handlePopUpOpen("addSSO");};@@ -512,6 +525,7 @@ export const OrgSsoTab = withPermission(</DialogClose><Buttonvariant="org"+ isPending={isCreatingSamlConfig}isDisabled={!selectedProvider}onClick={handleConnectSelected}>diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/SSOModal.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/SSOModal.tsxindex b432b5c068..c37c33d9c2 100644--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/SSOModal.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/SSOModal.tsx@@ -86,7 +86,7 @@ const ssoAuthProviders = [const schema = z.object({authProvider: z.string().min(1, "SSO Type is required"),- entryPoint: z.string().min(1, "URL required"),+ entryPoint: z.string().trim().min(1, "URL required"),issuer: z.string().default(""),cert: z.string().default("")})