@@ -46,20 +46,20 @@ import "type/v1beta1/selector.proto";
46
46
//
47
47
// Here is an example of Istio Authorization Policy:
48
48
//
49
- // It sets the `action` to " ALLOW" to create an allow policy. The default action is " ALLOW"
49
+ // It sets the `action` to ` ALLOW` to create an allow policy. The default action is ` ALLOW`
50
50
// but it is useful to be explicit in the policy.
51
51
//
52
52
// It allows requests from:
53
53
//
54
- // - service account " cluster.local/ns/default/sa/sleep" or
55
- // - namespace " test"
54
+ // - service account ` cluster.local/ns/default/sa/sleep` or
55
+ // - namespace ` test`
56
56
//
57
57
// to access the workload with:
58
58
//
59
- // - " GET" method at paths of prefix " /info" or,
60
- // - " POST" method at path " /data" .
59
+ // - ` GET` method at paths of prefix ` /info` or,
60
+ // - ` POST` method at path ` /data` .
61
61
//
62
- // when the request has a valid JWT token issued by " https://accounts.google.com" .
62
+ // when the request has a valid JWT token issued by ` https://accounts.google.com` .
63
63
//
64
64
// Any other requests will be denied.
65
65
//
@@ -89,9 +89,9 @@ import "type/v1beta1/selector.proto";
89
89
// values: ["https://accounts.google.com"]
90
90
// ```
91
91
//
92
- // The following is another example that sets `action` to " DENY" to create a deny policy.
93
- // It denies requests from the " dev" namespace to the " POST" method on all workloads
94
- // in the " foo" namespace.
92
+ // The following is another example that sets `action` to ` DENY` to create a deny policy.
93
+ // It denies requests from the ` dev` namespace to the ` POST` method on all workloads
94
+ // in the ` foo` namespace.
95
95
//
96
96
// ```yaml
97
97
// apiVersion: security.istio.io/v1
@@ -111,7 +111,7 @@ import "type/v1beta1/selector.proto";
111
111
// ```
112
112
//
113
113
// The following is another example that sets `action` to `DENY` to create a deny policy.
114
- // It denies all the requests with " POST" method on port " 8080" on all workloads
114
+ // It denies all the requests with ` POST` method on port ` 8080` on all workloads
115
115
// in the `foo` namespace.
116
116
//
117
117
// ```yaml
@@ -130,12 +130,12 @@ import "type/v1beta1/selector.proto";
130
130
// ```
131
131
//
132
132
// When this rule is applied to TCP traffic, the `method` field (as will all HTTP based attributes) cannot be processed.
133
- // For a `DENY` rule, missing attributes are treated as matches. This means all TCP traffic on port 8080 would be denied in the example above.
133
+ // For a `DENY` rule, missing attributes are treated as matches. This means all TCP traffic on port ` 8080` would be denied in the example above.
134
134
// If we were to remove the `ports` match, all TCP traffic would be denied. As a result, it is recommended to always scope `DENY` policies to a specific port,
135
135
// especially when using HTTP attributes [Authorization Policy for TCP Ports](https://istio.io/latest/docs/tasks/security/authorization/authz-tcp/).
136
136
//
137
- // The following authorization policy sets the `action` to " AUDIT" . It will audit any GET requests to the path with the
138
- // prefix " /user/profile" .
137
+ // The following authorization policy sets the `action` to ` AUDIT` . It will audit any GET requests to the path with the
138
+ // prefix ` /user/profile` .
139
139
//
140
140
// ```yaml
141
141
// apiVersion: security.istio.io/v1
@@ -156,16 +156,14 @@ import "type/v1beta1/selector.proto";
156
156
// ```
157
157
//
158
158
// Authorization Policy scope (target) is determined by "metadata/namespace" and
159
- // an optional " selector" .
159
+ // an optional ` selector` .
160
160
//
161
161
// - "metadata/namespace" tells which namespace the policy applies. If set to root
162
162
// namespace, the policy applies to all namespaces in a mesh.
163
- // - workload "selector" can be used to further restrict where a policy applies.
164
- //
165
- // For example,
163
+ // - workload `selector` can be used to further restrict where a policy applies.
166
164
//
167
- // The following authorization policy applies to all workloads in namespace foo. It allows nothing and effectively denies
168
- // all requests to workloads in namespace foo.
165
+ // For example, the following authorization policy applies to all workloads in namespace ` foo` . It allows nothing and effectively denies
166
+ // all requests to workloads in namespace ` foo` .
169
167
//
170
168
// ```yaml
171
169
// apiVersion: security.istio.io/v1
@@ -177,7 +175,7 @@ import "type/v1beta1/selector.proto";
177
175
// {}
178
176
// ```
179
177
//
180
- // The following authorization policy allows all requests to workloads in namespace foo.
178
+ // The following authorization policy allows all requests to workloads in namespace ` foo` .
181
179
//
182
180
// ```yaml
183
181
// apiVersion: security.istio.io/v1
@@ -190,7 +188,7 @@ import "type/v1beta1/selector.proto";
190
188
// - {}
191
189
// ```
192
190
//
193
- // The following authorization policy applies to workloads containing label " app: httpbin" in namespace bar. It allows
191
+ // The following authorization policy applies to workloads containing label ` app: httpbin` in namespace ` bar` . It allows
194
192
// nothing and effectively denies all requests to the selected workloads.
195
193
//
196
194
// ```yaml
@@ -205,8 +203,8 @@ import "type/v1beta1/selector.proto";
205
203
// app: httpbin
206
204
// ```
207
205
//
208
- // The following authorization policy applies to workloads containing label " version: v1" in all namespaces in the mesh.
209
- // (Assuming the root namespace is configured to " istio-system" ).
206
+ // The following authorization policy applies to workloads containing label ` version: v1` in all namespaces in the mesh.
207
+ // (Assuming the root namespace is configured to ` istio-system` ).
210
208
//
211
209
// ```yaml
212
210
// apiVersion: security.istio.io/v1
0 commit comments