feat: add saml model & controller [CW-2958] (#12289)
This PR adds the foundation for account-level SAML SSO configuration in Chatwoot Enterprise. It introduces a new `AccountSamlSettings` model and management API that allows accounts to configure their own SAML identity providers independently, this also includes the certificate generation flow The implementation includes a new controller (`Api::V1::Accounts::SamlSettingsController`) that provides CRUD operations for SAML configuration The feature is properly gated behind the 'saml' feature flag and includes administrator-only authorization via Pundit policies.
This commit is contained in:
14
db/schema.rb
14
db/schema.rb
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2025_08_22_061042) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2025_08_25_070005) do
|
||||
# These extensions should be enabled to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
enable_extension "pg_trgm"
|
||||
@@ -28,6 +28,18 @@ ActiveRecord::Schema[7.1].define(version: 2025_08_22_061042) do
|
||||
t.index ["token"], name: "index_access_tokens_on_token", unique: true
|
||||
end
|
||||
|
||||
create_table "account_saml_settings", force: :cascade do |t|
|
||||
t.bigint "account_id", null: false
|
||||
t.string "sso_url"
|
||||
t.text "certificate"
|
||||
t.string "sp_entity_id"
|
||||
t.string "idp_entity_id"
|
||||
t.json "role_mappings", default: {}
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id"], name: "index_account_saml_settings_on_account_id"
|
||||
end
|
||||
|
||||
create_table "account_users", force: :cascade do |t|
|
||||
t.bigint "account_id"
|
||||
t.bigint "user_id"
|
||||
|
||||
Reference in New Issue
Block a user