Skip to content

Commit a8bbd63

Browse files
authored
Sync Gloo APIs to v1.5.x (#68)
* Sync Gloo APIs to v1.5.x
1 parent d17360b commit a8bbd63

File tree

9 files changed

+626
-242
lines changed

9 files changed

+626
-242
lines changed

api/gloo/enterprise.gloo/v1/auth_config.proto

+41
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import "google/api/annotations.proto";
1616
import "google/protobuf/duration.proto";
1717
import "google/protobuf/struct.proto";
1818
import "google/protobuf/wrappers.proto";
19+
import "google/protobuf/empty.proto";
1920

2021

2122
// This is the user-facing auth configuration. When processed by Gloo, certain configuration types (i.a. oauth, opa)
@@ -301,6 +302,34 @@ message HeaderConfiguration {
301302
string id_token_header = 1;
302303
}
303304

305+
// The json web key set (JWKS) (https://tools.ietf.org/html/rfc7517) is discovered at an interval
306+
// from a remote source. When keys rotate in the remote source, there may be a delay in the
307+
// local source picking up those new keys. Therefore, a user could execute a request with a token
308+
// that has been signed by a key in the remote JWKS, but the local cache doesn't have the key yet.
309+
// The request would fail because the key isn't contained in the local set. Since most IdPs publish key
310+
// keys in their remote JWKS before they are used, this is not an issue most of the time.
311+
// This policy lets you define the behavior for when a user has a token with a key
312+
// not yet in the local cache.
313+
message JwksOnDemandCacheRefreshPolicy {
314+
oneof policy {
315+
// Never refresh the local JWKS cache on demand. If a key is not in the cache, it is assumed to be malicious.
316+
// This is the default policy since we assume that IdPs publish keys before they rotate them,
317+
// and frequent polling finds the newest keys.
318+
google.protobuf.Empty never = 1;
319+
320+
// If a key is not in the cache, fetch the most recent keys from the IdP and update the cache.
321+
// NOTE: This should only be done in trusted environments, since missing keys will each trigger
322+
// a request to the IdP. Using this in an environment exposed to the internet will allow malicious agents to
323+
// execute a DDoS attack by spamming protected endpoints with tokens signed by invalid keys.
324+
google.protobuf.Empty always = 2;
325+
326+
// If a key is not in the cache, fetch the most recent keys from the IdP and update the cache.
327+
// This value sets the number of requests to the IdP per polling interval. If that limit is exceeded,
328+
// we will stop fetching from the IdP for the remainder of the polling interval.
329+
uint32 max_idp_req_per_polling_interval = 3;
330+
}
331+
}
332+
304333
message OidcAuthorizationCode {
305334
// your client id as registered with the issuer
306335
string client_id = 1;
@@ -341,6 +370,12 @@ message OidcAuthorizationCode {
341370
// If not specified, the default value is 30 minutes.
342371
google.protobuf.Duration discovery_poll_interval = 12;
343372

373+
// If a user executes a request with a key that is not found in the JWKS, it could be
374+
// that the keys have rotated on the remote source, and not yet in the local cache.
375+
// This policy lets you define the behavior for how to refresh the local cache during a request
376+
// where an invalid key is provided
377+
JwksOnDemandCacheRefreshPolicy jwks_cache_refresh_policy = 13;
378+
344379
// in the future we may implement this:
345380
// add optional configuration for validation of the access token received during the OIDC flow
346381
// AccessTokenValidation access_token_validation = 8;
@@ -545,6 +580,12 @@ message ExtAuthConfig {
545580
// If not specified, the default value is 30 minutes.
546581
google.protobuf.Duration discovery_poll_interval = 12;
547582

583+
// If a user executes a request with a key that is not found in the JWKS, it could be
584+
// that the keys have rotated on the remote source, and not yet in the local cache.
585+
// This policy lets you define the behavior for how to refresh the local cache during a request
586+
// where an invalid key is provided
587+
JwksOnDemandCacheRefreshPolicy jwks_cache_refresh_policy = 13;
588+
548589
// in the future we may implement this:
549590
// add optional configuration for validation of the access token received during the OIDC flow
550591
// AccessTokenValidation access_token_validation = 8;

pkg/api/enterprise.gloo.solo.io/v1/auth_config.pb.go

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

pkg/api/enterprise.gloo.solo.io/v1/auth_config.pb.hash.go

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

pkg/api/enterprise.gloo.solo.io/v1/auth_config_json.gen.go

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

pkg/api/gloo.solo.io/external/envoy/api/v2/route/route.pb.hash.go

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

pkg/api/gloo.solo.io/v1/endpoint.pb.hash.go

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

pkg/api/gloo.solo.io/v1/options/azure/azure.pb.hash.go

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

pkg/api/gloo.solo.io/v1/proxy.pb.hash.go

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

pkg/api/gloo.solo.io/v1/secret.pb.hash.go

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

0 commit comments

Comments
 (0)