Skip to main content

Payroll API Authentication and Context

Summary

Payroll APIs expect gateway-forwarded bearer, tenant, actor, and correlation context, while service-local authentication and role enforcement remain incomplete.

Audience

Frontend and backend developers, QA and support engineers, architects, security reviewers, and implementation partners.

Overview

Confirmed context flow

The compatibility monolith controllers require authorization, establishing the client-contract expectation for bearer authentication. Gateway routing forwards requests to Payroll Service. Payroll derives tenant and actor context from forwarded claims/request context and uses explicit tenant predicates and persistence filters. Correlation middleware accepts or creates correlation context and returns it on responses.

Enforcement classification

  • Authentication expectation: bearer context for business operations.
  • Authorization: no Payroll Service route-level role/policy metadata is confirmed. Payroll-admin, Finance, employee-self, and privileged access rules Require confirmation.
  • Missing tenant: no consistent endpoint-level status mapping is implemented; behavior Requires confirmation.
  • Direct exposure: must not be assumed equivalent to gateway-mediated access.
  • 401/403: no Payroll Service-specific mapping is documented because local enforcement is not registered.

Exact token claims, headers, signing details, key material, configuration names, and development trust mechanisms are intentionally excluded.

Source References

  • microservices/src/payroll-service/Program.cs
  • microservices/src/payroll-service/Infrastructure/Persistence.cs
  • microservices/src/gateway-api/Program.cs
  • microservices/src/shared-kernel/Middleware/CorrelationIdMiddleware.cs
  • Controllers/PayrollController.cs

See Also

Keywords

  • Payroll API
  • Payroll API Authentication and Context

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly