Bounded Context: Configuration
Aggregate Root: IdpConfiguration
Module: Ums.Domain.Configuration.IdpConfiguration
Status: Production
The IdpConfiguration aggregate stores a tenant and suite-specific identity-provider resolution rule. It encapsulates provider type, domain hints, external configuration payload, secret reference, activation state, fallback chaining, resolution priority, and versioning.
IdpConfiguration is the aggregate root. Secret references, payload changes, domain hints, and lifecycle transitions are coordinated through it.
TenantId, SystemSuiteId, and ProviderType are mandatory.ConfigPayload must be non-empty.Draft.Draft and Inactive configurations may be updated.Active.Version.| Entity / VO | Type | Ownership |
|—|—|—|
| IdpConfigurationId | Value Object | Aggregate identifier |
| TenantId | Value Object | Tenant ownership boundary |
| SystemSuiteId | Value Object | Suite ownership boundary |
| ProviderType | Enumeration | Provider classification |
| IdpConfigStatus | Enumeration | Draft, Active, Inactive |
| Event | Trigger |
|—|—|
| IdpConfigRegisteredEvent | New configuration created |
| IdpConfigActivatedEvent | Configuration activated |
| IdpConfigDeactivatedEvent | Configuration deactivated |
| IdpConfigUpdatedEvent | Mutable configuration updated |
IdpConfiguration (Aggregate Root)
└── Props: IdpConfigurationProps
├── Id: IdValueObject
├── TenantId: TenantId
├── SystemSuiteId: SystemSuiteId
├── ProviderType: ProviderType
├── DomainHints: string[]
├── ConfigPayload: string
├── SecretRef: string
├── Status: IdpConfigStatus
├── ResolutionPriority: int
├── FallbackToId?: Guid
├── Version: int
└── Audit: AuditValueObject
classDiagram
class IdpConfiguration {
+Guid Id
+Guid TenantId
+Guid SystemSuiteId
+ProviderType ProviderType
+string[] DomainHints
+string ConfigPayload
+string SecretRef
+IdpConfigStatus Status
+int ResolutionPriority
+Guid FallbackToId
+int Version
+Create(tenantId, systemSuiteId, providerType, domainHints, configPayload, secretRef, resolutionPriority, fallbackToId, actor)
+Update(configPayload, secretRef, domainHints, actor)
+Activate(actor)
+Deactivate(actor)
}
sequenceDiagram
participant C as Client
participant H as Handler
participant R as IIdpConfigurationRepository
participant I as IdpConfiguration (AR)
C->>H: UpdateIdpConfiguration(id, payload, secretRef, domainHints)
H->>R: GetById(id)
R-->>H: IdpConfiguration
H->>I: Update(payload, secretRef, domainHints, actor)
I->>I: Validate mutable status and payload
I->>I: Increment Version
I->>I: Raise IdpConfigUpdatedEvent
H->>R: Update(configuration)
erDiagram
TENANT ||--o{ IDP_CONFIGURATION : "owns"
SYSTEM_SUITE ||--o{ IDP_CONFIGURATION : "scopes"
IDP_CONFIGURATION {
uniqueidentifier Id PK
uniqueidentifier TenantId FK
uniqueidentifier SystemSuiteId FK
int ProviderTypeId
nvarchar DomainHintsJson
nvarchar ConfigPayload
nvarchar SecretRef
int StatusId
int ResolutionPriority
uniqueidentifier FallbackToId
int Version
nvarchar CreatedBy
datetime2 CreatedAtUtc
nvarchar UpdatedBy
datetime2 UpdatedAtUtc
nvarchar AuditTimeSpan
}
TenantId.SystemSuiteId.ResolutionPriority and FallbackToId.SecretRef is the sensitive integration reference and should be resolved through secure secret-management infrastructure.ConfigPayload is authoritative for provider-specific runtime behavior and must be controlled administratively.