From d587e779f547762f557ccdd0ccaf8e8331812cf7 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Sat, 16 Aug 2025 00:26:06 +0400 Subject: [PATCH] requested changes --- .../OrgSsoTab/OrgGeneralAuthSection.tsx | 26 +++++++-- .../components/OrgSsoTab/OrgLDAPSection.tsx | 55 ++++++++++--------- .../components/OrgSsoTab/OrgOIDCSection.tsx | 33 +++++------ .../components/OrgSsoTab/OrgSSOSection.tsx | 28 +++++----- .../components/OrgSsoTab/OrgSsoTab.tsx | 53 +++++++++--------- 5 files changed, 103 insertions(+), 92 deletions(-) diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx index 262f9e2c0..de568931a 100644 --- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx +++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx @@ -23,10 +23,12 @@ enum EnforceAuthType { export const OrgGeneralAuthSection = ({ isSamlConfigured, - isOidcConfigured + isOidcConfigured, + isGoogleConfigured }: { isSamlConfigured: boolean; isOidcConfigured: boolean; + isGoogleConfigured: boolean; }) => { const { currentOrg } = useOrganization(); const { subscription } = useSubscription(); @@ -125,8 +127,14 @@ export const OrgGeneralAuthSection = ({ }; return ( - <> -
+
+
+

SSO Enforcement

+

+ Manage strict enforcement of specific authentication methods for your organization. +

+
+
@@ -147,6 +155,8 @@ export const OrgGeneralAuthSection = ({

Enforce users to authenticate via SAML to access this organization. +
+ When this is enabled your organization members will only be able to login with SAML.

@@ -169,11 +179,13 @@ export const OrgGeneralAuthSection = ({

- Enforce users to authenticate via OIDC to access this organization. + Enforce users to authenticate via OIDC to access this organization. +
+ When this is enabled your organization members will only be able to login with OIDC.

-
+
Enforce Google SSO @@ -193,6 +205,8 @@ export const OrgGeneralAuthSection = ({

Enforce users to authenticate via Google to access this organization. +
+ When this is enabled your organization members will only be able to login with Google.

@@ -263,6 +277,6 @@ export const OrgGeneralAuthSection = ({ onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)} text="You can enforce SAML SSO if you switch to Infisical's Pro plan." /> - +
); }; diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx index 9c7293210..e66987bae 100644 --- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx +++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx @@ -95,43 +95,25 @@ export const OrgLDAPSection = (): JSX.Element => { }; return ( -
+
-
-

LDAP

-
- - {(isAllowed) => ( - - )} - +
+
+

LDAP

+

Manage LDAP authentication configuration

-
-

Manage LDAP authentication configuration

-
-
-
-

LDAP Group Mappings

{(isAllowed) => ( - )}
-

- Manage how LDAP groups are mapped to internal groups in Infisical -

+ {data && ( -
+

Enable LDAP

@@ -152,6 +134,27 @@ export const OrgLDAPSection = (): JSX.Element => {

)} + +
+
+

LDAP Group Mappings

+ + {(isAllowed) => ( + + )} + +
+

+ Manage how LDAP groups are mapped to internal groups in Infisical +

+
+ { }; return ( -
-
-
-

OIDC

- {!isPending && ( - - {(isAllowed) => ( - - )} - - )} +
+
+
+

OIDC

+

Manage OIDC authentication configuration

-

Manage OIDC authentication configuration

+ + {!isPending && ( + + {(isAllowed) => ( + + )} + + )}
{data && (
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx index 4b1278b6d..33843f50f 100644 --- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx +++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx @@ -80,23 +80,23 @@ export const OrgSSOSection = (): JSX.Element => { return (
-
-
-

SAML

- {!isPending && ( - - {(isAllowed) => ( - - )} - - )} +
+
+

SAML

+

Manage SAML authentication configuration

-

Manage SAML authentication configuration

+ {!isPending && ( + + {(isAllowed) => ( + + )} + + )}
-
+

Enable SAML

{!isPending && ( diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSsoTab.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSsoTab.tsx index 2d8e0af27..9964fdf4d 100644 --- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSsoTab.tsx +++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSsoTab.tsx @@ -61,6 +61,7 @@ export const OrgSsoTab = withPermission( const isSamlConfigured = samlConfig && (samlConfig.entryPoint || samlConfig.issuer || samlConfig.cert); const isLdapConfigured = ldapConfig && ldapConfig.url; + const isGoogleConfigured = shouldDisplaySection(LoginMethod.GOOGLE); const shouldShowCreateIdentityProviderView = !isOidcConfigured && !isSamlConfigured && !isLdapConfigured; @@ -70,12 +71,14 @@ export const OrgSsoTab = withPermission( shouldDisplaySection(LoginMethod.OIDC) || shouldDisplaySection(LoginMethod.LDAP) ? ( <> -
-

Connect an Identity Provider

-

- Connect your identity provider to simplify user management with options like SAML, - OIDC, and LDAP. -

+
+
+

Connect an Identity Provider

+

+ Connect your identity provider to simplify user management with options like SAML, + OIDC, and LDAP. +

+
{shouldDisplaySection(LoginMethod.SAML) && (
- {shouldShowCreateIdentityProviderView ? ( -
+
+ {shouldDisplaySection([LoginMethod.SAML, LoginMethod.GOOGLE]) && ( -
- {createIdentityProviderView} -
- ) : ( -
-
- {/* {shouldDisplaySection([LoginMethod.SAML, LoginMethod.GOOGLE]) && ( */} - - {/* )} */} + )} + + {shouldShowCreateIdentityProviderView ? ( + createIdentityProviderView + ) : ( +
+
+ {isSamlConfigured && shouldDisplaySection(LoginMethod.SAML) && } + {isOidcConfigured && shouldDisplaySection(LoginMethod.OIDC) && } + {isLdapConfigured && shouldDisplaySection(LoginMethod.LDAP) && } +
-
-
- {isSamlConfigured && shouldDisplaySection(LoginMethod.SAML) && } - {isOidcConfigured && shouldDisplaySection(LoginMethod.OIDC) && } - {isLdapConfigured && shouldDisplaySection(LoginMethod.LDAP) && } -
-
- )} + )} +
handlePopUpToggle("upgradePlan", isOpen)}