Skip to content

Commit 293498c

Browse files
committed
JWTRule add allow field to specify jwt requirements
1 parent 2516db5 commit 293498c

10 files changed

+405
-49
lines changed

kubernetes/customresourcedefinitions.gen.yaml

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

proto.lock

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44233,6 +44233,20 @@
4423344233
{
4423444234
"protopath": "security:/:v1:/:jwt.proto",
4423544235
"def": {
44236+
"enums": [
44237+
{
44238+
"name": "JWTRule.Allow",
44239+
"enum_fields": [
44240+
{
44241+
"name": "ALLOW_MISSING"
44242+
},
44243+
{
44244+
"name": "ALLOW_MISSING_OR_FAILED",
44245+
"integer": 1
44246+
}
44247+
]
44248+
}
44249+
],
4423644250
"messages": [
4423744251
{
4423844252
"name": "JWTRule",
@@ -44291,6 +44305,11 @@
4429144305
"name": "output_claim_to_headers",
4429244306
"type": "ClaimToHeader",
4429344307
"is_repeated": true
44308+
},
44309+
{
44310+
"id": 12,
44311+
"name": "allow",
44312+
"type": "Allow"
4429444313
}
4429544314
]
4429644315
},
@@ -44729,6 +44748,20 @@
4472944748
{
4473044749
"protopath": "security:/:v1beta1:/:jwt.proto",
4473144750
"def": {
44751+
"enums": [
44752+
{
44753+
"name": "JWTRule.Allow",
44754+
"enum_fields": [
44755+
{
44756+
"name": "ALLOW_MISSING"
44757+
},
44758+
{
44759+
"name": "ALLOW_MISSING_OR_FAILED",
44760+
"integer": 1
44761+
}
44762+
]
44763+
}
44764+
],
4473244765
"messages": [
4473344766
{
4473444767
"name": "JWTRule",
@@ -44787,6 +44820,11 @@
4478744820
"name": "output_claim_to_headers",
4478844821
"type": "ClaimToHeader",
4478944822
"is_repeated": true
44823+
},
44824+
{
44825+
"id": 12,
44826+
"name": "allow",
44827+
"type": "Allow"
4479044828
}
4479144829
]
4479244830
},

security/v1/jwt.pb.go

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

security/v1/jwt.pb.html

Lines changed: 48 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

security/v1/jwt.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,25 @@ message JWTRule {
162162
// ```
163163
// [Experimental] This feature is a experimental feature.
164164
repeated ClaimToHeader output_claim_to_headers = 11; // [TODO:Update the status whenever this feature is promoted.]
165+
166+
// Allow specifies a Jwt requirement.
167+
enum Allow {
168+
// The requirement is satisfied if JWT is missing, but failed if JWT is
169+
// presented but invalid. Similar to ALLOW_MISSING_OR_FAILED, this is used
170+
// to only verify JWTs and pass the verified payload to another filter. The
171+
// different is this mode will reject requests with invalid tokens.
172+
// This is the default behavior.
173+
ALLOW_MISSING = 0;
174+
175+
// The requirement is always satisfied even if JWT is missing or the JWT
176+
// verification fails. A typical usage is: this filter is used to only verify
177+
// JWTs and pass the verified JWT payloads to another filter, the other filter
178+
// will make decision. In this mode, all JWT tokens will be verified.
179+
ALLOW_MISSING_OR_FAILED = 1;
180+
}
181+
182+
// Allow specifies a Jwt requirement. This is Optional, the default value is ALLOW_MISSING.
183+
Allow allow = 12;
165184
}
166185

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

security/v1beta1/jwt.gen.json

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

0 commit comments

Comments
 (0)