Skip to content

Commit 0ad71b5

Browse files
committed
support specify jwt requirement
1 parent c6ba867 commit 0ad71b5

File tree

7 files changed

+354
-53
lines changed

7 files changed

+354
-53
lines changed

Diff for: kubernetes/customresourcedefinitions.gen.yaml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: releasenotes/notes/2733.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: release-notes/v2
2+
kind: feature
3+
area: security
4+
issue:
5+
- https://github.com/istio/istio/issues/43982
6+
7+
releaseNotes:
8+
- |
9+
**Added** a `failure_mode` field to specify a Jwt requirement. This is optional, the default value is `PERMISSIVE`.

Diff for: security/v1/jwt.pb.go

+109-25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: security/v1/jwt.proto

+26-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ option go_package="istio.io/api/security/v1";
5858
// fromHeaders:
5959
// - "x-goog-iap-jwt-assertion"
6060
// ```
61+
//
62+
// The following example specifies that the JWT must be presented and verification successful.
63+
//
64+
// ```yaml
65+
// - issuer: issuer-foo
66+
// jwksUri: https://example.com/.well-known/jwks.json
67+
// failureMode: STRICT
68+
// ```
69+
//
6170
message JWTRule {
6271
// Identifies the issuer that issued the JWT. See
6372
// [issuer](https://tools.ietf.org/html/rfc7519#section-4.1.1)
@@ -183,8 +192,24 @@ message JWTRule {
183192
// will spend waiting for the JWKS to be fetched. Default is 5s.
184193
google.protobuf.Duration timeout = 13;
185194

195+
// FailureMode specifies a Jwt requirement.
196+
enum FailureMode {
197+
// The requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid.
198+
// This is the default behavior.
199+
PERMISSIVE = 0;
200+
201+
// The requirement is always satisfied even if JWT is missing or the JWT verification fails.
202+
IGNORE = 1;
203+
204+
// The requirement is satisfied only if JWT is presented and verification successful.
205+
STRICT = 2;
206+
}
207+
208+
// This field specifies a Jwt requirement. This is optional, the default value is `PERMISSIVE`.
209+
FailureMode failure_mode = 14;
210+
186211
// $hide_from_docs
187-
// Next available field number: 14
212+
// Next available field number: 15
188213
}
189214

190215
// This message specifies a header location to extract JWT token.

0 commit comments

Comments
 (0)