Every caller is authenticated
The design says how the service knows who is calling, for users and for other services.
CriticalChecked automatically
- Applies to:
- Every service
- Rule id:
- security.authn-defined
Why it matters
"It's only reachable inside the network" is not authentication. Anything that gets a foothold in the network, such as a compromised service or a misrouted request, can call an unauthenticated service as anyone. Broken authentication has been near the top of the API risk lists for years.
How to apply it
- Authenticate every request, including service-to-service calls: signed tokens validated by the service, or mutual TLS between services.
- Validate the token yourself (signature, expiry, audience). Don't trust a header because a gateway usually sets it.
- Keep health checks as the only unauthenticated endpoints, and make them say nothing.
Example
security.authn: OAuth 2.0 bearer JWT validated against the issuer's keys (audience orders-api); mTLS between services.
References
Checklists with this rule
Related agent skill: microservice-security