-
Notifications
You must be signed in to change notification settings - Fork 10
/
cel-multi-si-sib-namespaced.yaml
65 lines (59 loc) · 1.84 KB
/
cel-multi-si-sib-namespaced.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus
apiVersion: intent.security.nimbus.com/v1alpha1
kind: SecurityIntent
metadata:
name: pkg-mgr-exec-multiple-nsscoped
spec:
intent:
id: swDeploymentTools
action: Block
---
apiVersion: intent.security.nimbus.com/v1alpha1
kind: SecurityIntent
metadata:
name: unauthorized-sa-token-access-multiple-nsscoped
spec:
intent:
id: unAuthorizedSaTokenAccess
action: Block
---
apiVersion: intent.security.nimbus.com/v1alpha1
kind: SecurityIntent
metadata:
name: dns-manipulation-multiple-nsscoped
spec:
intent:
id: dnsManipulation
action: Block
---
apiVersion: intent.security.nimbus.com/v1alpha1
kind: SecurityIntentBinding
metadata:
name: multiple-sis-nsscoped-binding
spec:
intents:
- name: pkg-mgr-exec-multiple-nsscoped
- name: unauthorized-sa-token-access-multiple-nsscoped
- name: dns-manipulation-multiple-nsscoped
selector:
workloadSelector:
cel:
- labels["app"] == "nginx"
#- labels["app"] == "nginx"
#- "'labels[\"app\"] == \"nginx\"'"
#- labels["app"] in ["nginx", "nginx-2"]
#- labels["app"].contains("nginx")
#- labels["app"].startsWith("nginx")
#- labels["app"].endsWith("nginx")
#- labels["app"].matches(".*nginx.*")
# Because certain characters or phrases are used as reserved words or have special meaning in YAML,
# you can't use the negation operator '!' of the Common Expression Language (CEL) directly
# Represent negation statements as strings
#- "'labels[\"app\"] != \"nginx\"'"
#- "'!(labels[\"app\"] in [\"nginx\", \"httpd\"])'"
#- "'!(labels[\"app\"] in [\"nginx\", \"nginx-2\"])'"
#- "'!labels[\"app\"].contains(\"nginx\")'"
#- "'!labels[\"app\"].startsWith(\"nginx\")'"
#- "'!labels[\"app\"].endsWith(\"nginx\")'"
#- "'!labels["app"].matches(".*nginx.*")'"