Course contentsShow
← Cloud and Infrastructure
Lesson 1623 of 2,98933. Service Mesh FeaturesFree lesson

Authorization Policies Basics

Creating AuthorizationPolicy resources to control which services can communicate based on identity.

Authorization Policies Basics

What you'll learn: How to create AuthorizationPolicy resources that control which services can communicate based on identity in a service mesh.

What Are Authorization Policies?

Now that your services communicate securely with mTLS (mutual authentication), the next layer of defense is authorization—deciding who can do what. Authorization policies let you define fine-grained access control rules based on service identity, ensuring that even though services can establish secure connections, they can only talk to services they're explicitly allowed to reach.

Think of it like building security after installing locks on all doors: mTLS gave you locks, but authorization policies are the access cards that determine which employees can enter which rooms.

How Authorization Policies Work

An AuthorizationPolicy resource specifies:

  • Where it applies (target workloads via selectors)
  • Who is making the request (source service identity)
  • What action to take (ALLOW, DENY, or default deny-all)
  • Conditions like HTTP methods, paths, or ports

When a request arrives at your service's sidecar proxy, the policy evaluates the caller's SPIFFE identity (verified through mTLS) against your rules before forwarding the request.

Basic Policy Structure

Without showing implementation details yet, a typical policy declares:

  • A selector identifying which services the policy protects
  • Rules listing which service identities are permitted to call specific operations
  • Actions determining whether to allow or deny traffic

You can create a default-deny stance (blocking all traffic unless explicitly allowed) or start permissive and gradually tighten access as you understand your service dependencies.

Key Takeaway: Authorization policies enforce service-to-service access control by evaluating caller identity against explicit allow/deny rules, creating defense-in-depth beyond encryption alone.