Skip to content

Commit

Permalink
auth policies
Browse files Browse the repository at this point in the history
  • Loading branch information
tunacinsoy committed Sep 9, 2024
1 parent 44bfe69 commit 9b288fe
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions manifests/blog-app/authorization-policies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# This manifest file is responsible for the communication allowances between services deployed in blog-app namespace.
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: posts
namespace: blog-app
spec:
selector:
matchLabels:
app: posts
action: ALLOW
rules:
- from:
- source:
matchLabels:
app: frontend
# principals: ["cluster.local/ns/blog-app/sa/frontend"]
---
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: reviews
namespace: blog-app
spec:
selector:
matchLabels:
app: reviews
# Any traffic that does not match the ALLOW rules will be denied by default
action: ALLOW
rules:
- from:
- source:
matchLabels:
app: frontend
# principals: ["cluster.local/ns/blog-app/sa/frontend"]
---
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: users
namespace: blog-app
spec:
selector:
matchLabels:
app: users
action: ALLOW
rules:
- from:
- source:
matchLabels:
app: frontend
# principals: ["cluster.local/ns/blog-app/sa/frontend"]
---
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: ratings
namespace: blog-app
spec:
selector:
matchLabels:
app: ratings
action: ALLOW
rules:
- from:
- source:
matchLabels:
app: reviews
# principals: ["cluster.local/ns/blog-app/sa/reviews"]
---
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: mongodb
namespace: blog-app
spec:
selector:
matchLabels:
app: mongodb
action: ALLOW
rules:
- from:
- source:
matchLabels:
app: posts
- source:
matchLabels:
app: reviews
- source:
matchLabels:
app: ratings
- source:
matchLabels:
app: users
# principals: ["cluster.local/ns/blog-app/sa/posts", "cluster.local/ns/blog-app/sa/reviews", "cluster.local/ns/blog-app/sa/ratings", "cluster.local/ns/blog-app/sa/users"]

0 comments on commit 9b288fe

Please sign in to comment.