← Microservices learning path
Microservices · Module 9 of 10

Security in microservices

Secure service-to-service and user access.

📖 Key ideas

  1. Authenticate users at the gateway (OAuth 2.0 / OIDC, JWT).
  2. Services verify tokens and check permissions.
  3. Service-to-service auth with mTLS or signed tokens.
  4. Secrets in a vault, not in code or images.
  5. Least privilege and network policies between services.
💡 Real-life example: Microservice security is a gated campus where every building also checks your badge.
OIDCOpenID Connect identity layer
JWTSigned token with claims
Zero trustVerify every request
Secrets vaultSecure secret storage