Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync APIs. @tag-name=gloo-attach-jwt-failure-status-to-metadata #1424

Open
wants to merge 1 commit into
base: gloo-main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,21 @@ message JwtProvider {
// Specify the clock skew in seconds when verifying JWT time constraint,
// such as `exp`, and `nbf`. If not specified, default is 60 seconds.
uint32 clock_skew_seconds = 10;

// If non empty, the failure status ``::google::jwt_verify::Status`` for a non verified JWT will be written to StreamInfo DynamicMetadata
// in the format as: ``namespace`` is the jwt_authn filter name as ``envoy.filters.http.jwt_authn``
// The value is the ``protobuf::Struct``. The values of this field will be ``code`` and ``message``
// and they will contain the JWT authentication failure status code and a message describing the failure.
//
// For example, if failed_status_in_metadata is ``my_auth_failure_status``:
//
// .. code-block:: yaml
//
// envoy.filters.http.jwt_authn:
// my_auth_failure_status:
// code: 3
// message: Jwt expired
string failed_status_in_metadata = 11;
}

// This message specifies how to fetch JWKS from remote and how to cache it.
Expand Down
7 changes: 7 additions & 0 deletions api/gloo/gloo/v1/enterprise/options/jwt/jwt.proto
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ message Provider {

// Optional: ClockSkewSeconds is used to verify time constraints, such as `exp` and `npf`. Default is 60s
google.protobuf.UInt32Value clock_skew_seconds = 8;

// Optional: If this field is not empty, the JWT failure status code and message are added to DynamicMetadata under the provided value.
// This is particularly useful when logging the status with access logs.
//
// For example, if the value of `attach_failed_status_in_metadata` is 'custom_auth_failure_status' then
// the status can be accessed in the access log as '%DYNAMIC_METADATA(envoy.filters.http.jwt_authn:custom_auth_failure_status:message)'
string attach_failed_status_in_metadata = 9;
}

message Jwks {
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

123 changes: 70 additions & 53 deletions pkg/api/gloo.solo.io/v1/enterprise/options/jwt/jwt.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/api/gloo.solo.io/v1/enterprise/options/jwt/jwt.pb.hash.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading