ums

Technical TODO

Pending technical tasks and investigations that are not yet committed to a sprint but should be tracked.


[TODO-001] Investigate and Fix GraphQL AppConfigurations Query

Problem

GraphQL endpoint /graphql for appConfigurations query returns empty results (items: [], totalItems: 0) while the REST-backed configuration reads return correct data.

Observations

Affected Files

Workaround

Use the REST configuration read path for AppConfigurations in the frontend. GraphQL for this bounded context remains unresolved in the backend resolver.

Next Steps

  1. Add debug logging to HotChocolate resolver execution
  2. Compare GraphQL vs REST request pipeline differences
  3. Investigate DataLoader caching issues
  4. Check if there’s a resolver scope mismatch

[TODO-002] Remove GraphQL Code Path from AppConfiguration Service

Problem

The frontend app-configuration.service.ts previously contained dual-transport logic (GraphQL + REST) even though the service had already standardized on REST. The GraphQL code path was dead code.

Affected Files

Resolution

The service now uses REST exclusively, and the stale GraphQL path has been removed from the frontend codebase.

Next Steps

No further action required.


[TODO-003] Implement Parameterization System with Loader and Provider

Problem

Currently, configurable behaviors in UMS may be hardcoded in web, API, services, or components. A centralized parameterization system is required to store all configurations in the database, load them into memory at startup, and provide a single access point for all system logic.

Specification

See: Parameterization System Specification

Affected Areas

Implemented Components (Phase 1)

Backend

  1. ConfigurationBootstrapper (Ums.Presentation/Bootstrapping/Bootstrappers/ConfigurationBootstrapper.cs)
    • Bootstrapper pattern for synchronous initialization at startup
    • Loads parameters BEFORE other services resolve IConfigurationProvider
    • Uses CompositeBootstrapper to ensure proper ordering
  2. ConfigurationProvider (Ums.Infrastructure/Configuration/ConfigurationProvider.cs)
    • Single access point for all configuration values
    • Implements precedence logic (Tenant > Global when allowed)
    • In-memory ConcurrentDictionary cache for global and tenant parameters
    • Provides ReloadAsync and ReloadTenantAsync methods
    • ConfigurationChanged event for audit integration
  3. IConfigurationProvider (Ums.Application/Configuration/Services/IConfigurationProvider.cs)
    • Interface defining GetGlobal, GetForTenant, GetWithPrecedence
    • GetValueAs for typed parameter retrieval
    • Event-based change notification
  4. ConfigurationAuditService (Ums.Application/Configuration/Services/ConfigurationAuditService.cs)
    • Audit trail integration for parameter changes
  5. ConfigurationLoaderExtensions (Ums.Infrastructure/Configuration/ConfigurationLoader.cs)
    • Extension method for DI registration of IConfigurationProvider
  6. ConfigurationValues (Ums.Application/Configuration/Services/ConfigurationValues.cs)
    • Typed wrapper for common configuration values
    • Provides strongly-typed access to: SessionTimeout, MaxLoginAttempts, MinPasswordLength, etc.
    • Supports tenant-specific overrides with precedence logic
  7. Configuration consumers already wired
    • AddUserAccountPasswordCommandValidator reads MIN_PASSWORD_LENGTH through ConfigurationValues
    • AuthEndpoints resolves login session parameters through the typed wrapper
  8. Tenant-Specific Parameters Seeded
    • RANSA_PERU: SESSION_TIMEOUT=45min, MFA_REQUIRED=true, CUSTOM_BRANDING=true
    • APM_CALLAO: SESSION_TIMEOUT=20min, MAX_LOGIN_ATTEMPTS=3, MFA_REQUIRED=true
    • NEPTUNIA: SESSION_TIMEOUT=60min, MIN_PASSWORD_LENGTH=14

Frontend

  1. TenantConfigurationsPanel (presentation/identity/tenant/components/TenantConfigurationsPanel.tsx)
    • Tab in TenantDetailPanel for tenant-specific parameters
    • View/edit tenant parameters
    • Add new tenant parameters
    • Visual indication of override vs global parameters
  2. Updated TenantDetailPanel
    • Integrated TenantConfigurationsPanel in the ‘configurations’ tab
  3. New Translations Added
    • Configuration parameter UI strings (EN/ES)

Remaining Work

  1. Add Redis migration preparation (TD-003)
  2. Expand ConfigurationValues consumers to any remaining handlers or validators as new parameterized behaviors are added
  3. Add parameter-level authorization where future policies require it

[TODO-004] Create Global Configuration Admin Screen

Problem

Internal Admin needs a dedicated screen to view and manage system-wide (Global) parameters separate from tenant-specific parameters.

Requirements

Affected Areas

Resolution

Next Steps

No further action required.