Skip to content

Commit 0e96d7b

Browse files
authored
AuthorizationPolicy serviceAccount: allow same namespace (#3417)
1 parent 37b36c0 commit 0e96d7b

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

security/v1beta1/authorization_policy.pb.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

security/v1beta1/authorization_policy.pb.html

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

security/v1beta1/authorization_policy.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ message Source {
462462
// This field requires mTLS enabled and is the same as the `source.serviceaccount` attribute.
463463
//
464464
// This takes the format `<namespace>/<serviceaccount>`.
465+
// `<serviceaccount>` may also be used to use the same namespace as the `AuthorizationPolicy`.
465466
//
466467
// If not set, any service account is allowed.
467468
//
@@ -475,6 +476,7 @@ message Source {
475476
// Optional. A list of negative match of Kubernetes service accounts.
476477
//
477478
// This takes the format `<namespace>/<serviceaccount>`.
479+
// `<serviceaccount>` may also be used to use the same namespace as the `AuthorizationPolicy`.
478480
//
479481
// No form of wildcard (`*`) is allowed.
480482
// +protoc-gen-crd:list-value-validation:MaxLength=320

tests/testdata/authz-valid.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ spec:
8181
rules:
8282
- from:
8383
- source:
84-
serviceAccounts: ["baz/sa"]
84+
serviceAccounts: ["baz/sa", "sa"]
8585
- source:
8686
principals: ["bar"]
8787
- source:

0 commit comments

Comments
 (0)