OpsCanary
securitynetwork securityPractitioner

Implementing Istio Authorization Policies: ALLOW Action for HTTP Traffic

5 min read Official DocsOct 11, 2026Reviewed for accuracy
Share
Practitioner — Hands-on experience recommended

In a microservices architecture, managing access control is vital for security and compliance. Istio provides a powerful way to enforce authorization policies, allowing you to define who can access what within your service mesh. This article focuses on setting up an ALLOW action policy for HTTP traffic, which is a common requirement in production environments.

To implement this, you begin by configuring a simple allow-nothing policy that rejects all requests to your workload. This sets a baseline of security. From there, you can incrementally grant access based on specific rules. For instance, you can create an authorization policy for the productpage service that allows GET requests. The configuration looks like this:

Bash
1$ kubectl apply -f - <<EOF
2apiVersion: security.istio.io/v1
3kind: AuthorizationPolicy
4metadata:
5  name: "productpage-viewer"
6  namespace: default
7spec:
8  selector:
9    matchLabels:
10      app: productpage
11  action: ALLOW
12  rules:
13  - to:
14    - operation:
15        methods: ["GET"]
16EOF

In production, you need to be cautious about how you define these policies. Start with the most restrictive settings and only open up access as necessary. This helps minimize your attack surface. Be aware that as you scale, managing these policies can become complex, especially if you have many services and varying access requirements. The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Key takeaways

  • →Configure a baseline deny-all policy with `allow-nothing` to enhance security.
  • →Incrementally grant access using specific rules tailored to your services.
  • →Utilize the `selector` field to target specific workloads for policy application.
  • →Monitor and adjust policies as your service mesh evolves to maintain security.

Why it matters

Implementing proper authorization policies in Istio helps prevent unauthorized access to your services, significantly reducing the risk of data breaches and service disruptions in production environments.

Code examples

Bash
1$ kubectl apply -f - <<EOF
2apiVersion: security.istio.io/v1
3kind: AuthorizationPolicy
4metadata:
5  name: allow-nothing
6  namespace: default
7spec:
8EOF
Bash
1$ kubectl apply -f - <<EOF
2apiVersion: security.istio.io/v1
3kind: AuthorizationPolicy
4metadata:
5  name: "productpage-viewer"
6  namespace: default
7spec:
8  selector:
9    matchLabels:
10      app: productpage
11  action: ALLOW
12  rules:
13  - to:
14    - operation:
15        methods: ["GET"]
16EOF
Bash
1$ kubectl apply -f - <<EOF
2apiVersion: security.istio.io/v1
3kind: AuthorizationPolicy
4metadata:
5  name: "details-viewer"
6  namespace: default
7spec:
8  selector:
9    matchLabels:
10      app: details
11  action: ALLOW
12  rules:
13  - from:
14    - source:
15        principals: ["cluster.local/ns/default/sa/bookinfo-productpage"]
16    to:
17    - operation:
18        methods: ["GET"]
19EOF

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
Linux FoundationSponsor

Industry-standard certifications built by the people behind Linux and Kubernetes. Earn the CKS — the advanced Kubernetes security specialist cert. OpsCanary readers get 30% off year-round with code OPSCANARY3.

Get CKS certified →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.