Feature: Tenant-Specific Configuration Infrastructure #24

Closed
opened 2026-07-05 20:20:11 +00:00 by psycodepath · 0 comments
Owner

Motivation

To support different authentication strategies (like LDAP, Authelia, or local) and other settings per tenant, we need a database-backed configuration store that is scoped to each isolated tenant SQLite database.

Description

Create the schema and repository to read/write system configuration values dynamically from the tenant's sqlite database.

User Story

As a system administrator, I want to configure tenant-specific settings inside each tenant's isolated database so that I don't leak configurations between tenants and can configure them independently.

Gherkin Feature

Feature: Tenant-Specific Configuration
  As an administrator
  I want to save settings for a tenant
  So that they only apply to that specific tenant's database context

  Scenario: Read tenant-specific config
    Given I have a tenant database for "family1"
    And "family1" database contains setting "auth_strategy" as "ldap"
    When the system requests "auth_strategy" for "family1"
    Then the value "ldap" is returned

Acceptance Criteria

  • Database migration to create a system_settings or auth_config table in tenant databases.
  • Implementation of TenantAuthSettingsRepository in Infrastructure.
  • Unit tests verifying that configuration values are retrieved from the correct tenant database.
### Motivation To support different authentication strategies (like LDAP, Authelia, or local) and other settings per tenant, we need a database-backed configuration store that is scoped to each isolated tenant SQLite database. ### Description Create the schema and repository to read/write system configuration values dynamically from the tenant's sqlite database. ### User Story As a system administrator, I want to configure tenant-specific settings inside each tenant's isolated database so that I don't leak configurations between tenants and can configure them independently. ### Gherkin Feature ```gherkin Feature: Tenant-Specific Configuration As an administrator I want to save settings for a tenant So that they only apply to that specific tenant's database context Scenario: Read tenant-specific config Given I have a tenant database for "family1" And "family1" database contains setting "auth_strategy" as "ldap" When the system requests "auth_strategy" for "family1" Then the value "ldap" is returned ``` ### Acceptance Criteria - [ ] Database migration to create a `system_settings` or `auth_config` table in tenant databases. - [ ] Implementation of `TenantAuthSettingsRepository` in Infrastructure. - [ ] Unit tests verifying that configuration values are retrieved from the correct tenant database.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psycodepath/hrp#24
No description provided.