@@ -247,6 +247,60 @@ message OAuth2 {
247
247
}
248
248
}
249
249
250
+ message RedisOptions {
251
+ // address of the redis. can be address:port or unix://path/to/unix.sock
252
+ string host = 1 ;
253
+ // db to use. can leave unset for db 0.
254
+ int32 db = 2 ;
255
+ // size of the connection pool. can leave unset for default.
256
+ // defaults to 10 connections per every CPU
257
+ int32 pool_size = 3 ;
258
+ }
259
+
260
+ message UserSession {
261
+ message InternalSession {}
262
+ message RedisSession {
263
+ // Options to connect to redis
264
+ RedisOptions options = 1 ;
265
+ // Key prefix inside redis
266
+ string key_prefix = 2 ;
267
+ // Cookie name to set and store the session id. If empty the default "__session" is used.
268
+ string cookie_name = 3 ;
269
+ }
270
+
271
+ // should we fail auth flow when failing to get a session from redis, or allow it to continue,
272
+ // potentially starting a new auth flow and setting a new session.
273
+ bool fail_on_fetch_failure = 1 ;
274
+
275
+ message CookieOptions {
276
+ // Max age for the cookie. Leave unset for a default of 30 days (2592000 seconds).
277
+ // To disable cookie expiry, set explicitly to 0.
278
+ google.protobuf.UInt32Value max_age = 1 ;
279
+ // Use a non-secure cookie. Note - this should only be used for testing and in trusted
280
+ // environments.
281
+ bool not_secure = 2 ;
282
+ // Path of the cookie. If unset, defaults to "/". Set it explicitly to "" to avoid setting a
283
+ // path.
284
+ google.protobuf.StringValue path = 3 ;
285
+ // Cookie domain
286
+ string domain = 4 ;
287
+ }
288
+
289
+ // Set-Cookie options
290
+ CookieOptions cookie_options = 2 ;
291
+ oneof session {
292
+ // Set the tokens in the cookie itself. No need for server side state.
293
+ InternalSession cookie = 3 ;
294
+ // Use redis to store the tokens and just store a random id in the cookie.
295
+ RedisSession redis = 4 ;
296
+ }
297
+ }
298
+
299
+ message HeaderConfiguration {
300
+ // If set, the id token will be forward upstream using this header name.
301
+ string id_token_header = 1 ;
302
+ }
303
+
250
304
message OidcAuthorizationCode {
251
305
// your client id as registered with the issuer
252
306
string client_id = 1 ;
@@ -266,12 +320,27 @@ message OidcAuthorizationCode {
266
320
string app_url = 5 ;
267
321
268
322
// a callback path relative to app url that will be used for OIDC callbacks.
269
- // needs to not be used by the application
323
+ // should not be used by the application.
270
324
string callback_path = 6 ;
271
325
326
+ // a path relative to app url that will be used for logging out from an OIDC session.
327
+ // should not be used by the application.
328
+ // If not provided, logout functionality will be disabled.
329
+ string logout_path = 9 ;
330
+
272
331
// Scopes to request in addition to openid scope.
273
332
repeated string scopes = 7 ;
274
333
334
+ // Configuration related to the user session.
335
+ UserSession session = 8 ;
336
+
337
+ // Configures headers added to requests.
338
+ HeaderConfiguration headers = 10 ;
339
+
340
+ // The interval at which OIDC configuration is discovered at <issuerUrl>/.well-known/openid-configuration
341
+ // If not specified, the default value is 30 minutes.
342
+ google.protobuf.Duration discovery_poll_interval = 12 ;
343
+
275
344
// in the future we may implement this:
276
345
// add optional configuration for validation of the access token received during the OIDC flow
277
346
// AccessTokenValidation access_token_validation = 8;
@@ -437,6 +506,7 @@ message ExtAuthConfig {
437
506
}
438
507
439
508
message OidcAuthorizationCodeConfig {
509
+
440
510
// your client id as registered with the issuer
441
511
string client_id = 1 ;
442
512
@@ -458,9 +528,23 @@ message ExtAuthConfig {
458
528
// needs to not be used by the application
459
529
string callback_path = 6 ;
460
530
531
+ // a path relative to app url that will be used for logging out from an OIDC session.
532
+ // should not be used by the application.
533
+ // If not provided, logout functionality will be disabled.
534
+ string logout_path = 9 ;
535
+
461
536
// scopes to request in addition to the openid scope.
462
537
repeated string scopes = 7 ;
463
538
539
+ UserSession session = 8 ;
540
+
541
+ // Configures headers added to requests.
542
+ HeaderConfiguration headers = 10 ;
543
+
544
+ // The interval at which OIDC configuration is discovered at <issuerUrl>/.well-known/openid-configuration
545
+ // If not specified, the default value is 30 minutes.
546
+ google.protobuf.Duration discovery_poll_interval = 12 ;
547
+
464
548
// in the future we may implement this:
465
549
// add optional configuration for validation of the access token received during the OIDC flow
466
550
// AccessTokenValidation access_token_validation = 8;
0 commit comments