From 2dbd43217ce63dcdcaf2d0b4c35f2e2dc488ca45 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 1 Sep 2025 12:10:58 +0530 Subject: [PATCH] feat: add SAML settings UI --- .../components-next/sidebar/Sidebar.vue | 6 + .../dashboard/i18n/locale/en/settings.json | 36 +++- .../dashboard/settings/security/Index.vue | 23 +++ .../security/components/SamlSettings.vue | 183 ++++++++++++++++++ .../settings/security/security.routes.js | 39 ++++ .../dashboard/settings/settings.routes.js | 2 + 6 files changed, 288 insertions(+), 1 deletion(-) create mode 100644 app/javascript/dashboard/routes/dashboard/settings/security/Index.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/security/security.routes.js diff --git a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue index 20139ed27..738f44a58 100644 --- a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue +++ b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue @@ -488,6 +488,12 @@ const menuItems = computed(() => { icon: 'i-lucide-clock-alert', to: accountScopedRoute('sla_list'), }, + { + name: 'Settings Security', + label: t('SIDEBAR.SECURITY'), + icon: 'i-lucide-shield', + to: accountScopedRoute('security_settings_index'), + }, { name: 'Settings Billing', label: t('SIDEBAR.BILLING'), diff --git a/app/javascript/dashboard/i18n/locale/en/settings.json b/app/javascript/dashboard/i18n/locale/en/settings.json index d547538db..9a3d58443 100644 --- a/app/javascript/dashboard/i18n/locale/en/settings.json +++ b/app/javascript/dashboard/i18n/locale/en/settings.json @@ -350,7 +350,8 @@ "INFO_TEXT": "Let the system automatically mark you offline when you aren't using the app or dashboard.", "INFO_SHORT": "Automatically mark offline when you aren't using the app." }, - "DOCS": "Read docs" + "DOCS": "Read docs", + "SECURITY": "Security" }, "BILLING_SETTINGS": { "TITLE": "Billing", @@ -382,6 +383,39 @@ }, "NO_BILLING_USER": "Your billing account is being configured. Please refresh the page and try again." }, + "SECURITY_SETTINGS": { + "TITLE": "Security", + "DESCRIPTION": "Manage your account security settings.", + "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.", + "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", + "HELP": "The public certificate from your identity provider used to verify SAML responses", + "PLACEHOLDER": "-----BEGIN CERTIFICATE-----\nMIIC..." + }, + "SP_ENTITY_ID": { + "LABEL": "Service Provider Entity ID", + "HELP": "Unique identifier for this application as a service provider. Leave blank to use default.", + "PLACEHOLDER": "my-unique-sp" + }, + "UPDATE_BUTTON": "Update SAML Settings", + "API": { + "SUCCESS": "SAML settings updated successfully", + "ERROR": "Failed to update SAML settings", + "ERROR_LOADING": "Failed to load SAML settings", + "DISABLED": "SAML settings disabled successfully" + }, + "VALIDATION": { + "REQUIRED_FIELDS": "SSO URL and Certificate are required fields" + } + } + }, "CREATE_ACCOUNT": { "NO_ACCOUNT_WARNING": "Uh oh! We could not find any Chatwoot accounts. Please create a new account to continue.", "NEW_ACCOUNT": "New Account", diff --git a/app/javascript/dashboard/routes/dashboard/settings/security/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/security/Index.vue new file mode 100644 index 000000000..70b8043ae --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/security/Index.vue @@ -0,0 +1,23 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue new file mode 100644 index 000000000..67b9d62d9 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue @@ -0,0 +1,183 @@ + + +