From f6b3cb62957ad388c79d2c46d9b9859aeeac4e45 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 1 Sep 2025 13:28:55 +0530 Subject: [PATCH] feat: add additional SAML information --- .../dashboard/i18n/locale/en/settings.json | 13 +++- .../security/components/SamlAttributeMap.vue | 48 +++++++++++++ .../security/components/SamlInfoSection.vue | 70 +++++++++++++++++++ .../security/components/SamlSettings.vue | 32 +++++---- 4 files changed, 150 insertions(+), 13 deletions(-) create mode 100644 app/javascript/dashboard/routes/dashboard/settings/security/components/SamlAttributeMap.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/security/components/SamlInfoSection.vue diff --git a/app/javascript/dashboard/i18n/locale/en/settings.json b/app/javascript/dashboard/i18n/locale/en/settings.json index 12ada9b81..1cc0c7236 100644 --- a/app/javascript/dashboard/i18n/locale/en/settings.json +++ b/app/javascript/dashboard/i18n/locale/en/settings.json @@ -390,16 +390,23 @@ "SAML": { "TITLE": "SAML SSO", "NOTE": "Configure SAML single sign-on for your account. Users will authenticate through your identity provider instead of using email/password.", + "ACS_URL": { + "LABEL": "ACS URL" + }, "SSO_URL": { "LABEL": "SSO URL", "HELP": "The URL where SAML authentication requests will be sent", "PLACEHOLDER": "https://your-idp.com/saml/sso" }, "CERTIFICATE": { - "LABEL": "X.509 Certificate", + "LABEL": "Signing certificate in PEM format", "HELP": "The public certificate from your identity provider used to verify SAML responses", "PLACEHOLDER": "-----BEGIN CERTIFICATE-----\nMIIC..." }, + "FINGERPRINT": { + "LABEL": "Fingerprint" + }, + "COPY_SUCCESS": "Copied to clipboard", "SP_ENTITY_ID": { "LABEL": "Service Provider Entity ID", "HELP": "Unique identifier for this application as a service provider. Leave blank to use default.", @@ -426,6 +433,10 @@ "UPGRADE_PROMPT": "Upgrade your plan to get access to SAML single sign-on and other advanced features.", "UPGRADE_NOW": "Upgrade now", "CANCEL_ANYTIME": "You can change or cancel your plan anytime" + }, + "ATTRIBUTE_MAPPING": { + "TITLE": "SAML Attribute Setup", + "DESCRIPTION": "The following attribute mappings must be configured in your identity provider" } } }, diff --git a/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlAttributeMap.vue b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlAttributeMap.vue new file mode 100644 index 000000000..db5cf735d --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlAttributeMap.vue @@ -0,0 +1,48 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlInfoSection.vue b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlInfoSection.vue new file mode 100644 index 000000000..e9e8156b8 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlInfoSection.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue index 4a4a7902e..4bee8b5a3 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue @@ -3,19 +3,23 @@ import { ref, computed, onMounted } from 'vue'; import { useI18n } from 'vue-i18n'; import { useAlert } from 'dashboard/composables'; import { useAccount } from 'dashboard/composables/useAccount'; +import samlSettingsAPI from 'dashboard/api/samlSettings'; + import SectionLayout from '../../account/components/SectionLayout.vue'; import WithLabel from 'v3/components/Form/WithLabel.vue'; import TextInput from 'next/input/Input.vue'; import TextArea from 'next/textarea/TextArea.vue'; import Switch from 'next/switch/Switch.vue'; import NextButton from 'next/button/Button.vue'; -import samlSettingsAPI from 'dashboard/api/samlSettings'; +import SamlInfoSection from './SamlInfoSection.vue'; +import SamlAttributeMap from './SamlAttributeMap.vue'; const { t } = useI18n(); const { isCloudFeatureEnabled } = useAccount(); const ssoUrl = ref(''); const certificate = ref(''); +const fingerprint = ref(''); const spEntityId = ref(''); const roleMappings = ref({}); const isEnabled = ref(false); @@ -37,6 +41,7 @@ const loadSamlSettings = async () => { certificate.value = settings.certificate || ''; spEntityId.value = settings.sp_entity_id || ''; roleMappings.value = settings.role_mappings || {}; + fingerprint.value = settings.fingerprint || ''; isEnabled.value = ssoUrl.value !== ''; } } catch (error) { @@ -129,6 +134,9 @@ onMounted(() => { + + +
{ /> + + + + { /> - - - -