Skip to main content

Asset API Tenant Context

Behavior​

Tenant context reads claims or forwarded request context and exposes tenant identifier/key, actor, role, user reference, and labor reference. Commands call RequireTenantId; the host converts tenant-related invalid-operation failures to a bad-request response. Queries rely on EF global filters. Compatibility operations use the same repository and filters.

The super-administrator context can bypass filters. Header authenticity, caller-to-resource ownership, employee membership, and document ownership authorization are Not implemented. Cross-tenant protection depends on correct tenant-context resolution and the verified query filters; production gateway trust requires confirmation.

Classification​

The API is Transitional. Capabilities explicitly described as absent are Not implemented. Host diagnostics and evidence routes are Foundation. Production exposure, ownership, and governance Require confirmation.

Source References​

  • microservices/src/asset-service/Program.cs
  • microservices/src/asset-service/Infrastructure/Persistence.cs
  • microservices/src/asset-service/Infrastructure/AssetDbContext.cs