From 257c05dbf3d552a56c2627c7858637e64471b6ab Mon Sep 17 00:00:00 2001 From: Hidetake Iwata Date: Mon, 28 Sep 2020 09:28:44 +0900 Subject: [PATCH] Change authentication timeout to 180 sec (#388) --- docs/usage.md | 6 +++--- pkg/adaptors/cmd/cmd.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 9f5afa2f..aef9d8df 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -18,7 +18,7 @@ Flags: --grant-type string Authorization grant type to use. One of (auto|authcode|authcode-keyboard|password) (default "auto") --listen-address strings [authcode] Address to bind to the local server. If multiple addresses are set, it will try binding in order (default [127.0.0.1:8000,127.0.0.1:18000]) --skip-open-browser [authcode] Do not open the browser automatically - --authentication-timeout-sec int [authcode] Timeout of authentication in seconds (default 60) + --authentication-timeout-sec int [authcode] Timeout of authentication in seconds (default 180) --local-server-cert string [authcode] Certificate path for the local server --local-server-key string [authcode] Certificate key path for the local server --open-url-after-authentication string [authcode] If set, open the URL in the browser after authentication @@ -48,12 +48,12 @@ Global Flags: ### Authentication timeout -By default, you need to log in to your provider on the browser within 60 seconds. +By default, you need to log in to your provider in the browser within 3 minutes. This prevents a process from remaining forever. You can change the timeout by the following flag: ```yaml - - --authentication-timeout-sec=3600 + - --authentication-timeout-sec=60 ``` For now this timeout works only for the authorization code flow. diff --git a/pkg/adaptors/cmd/cmd.go b/pkg/adaptors/cmd/cmd.go index d61cc4ba..b2306047 100644 --- a/pkg/adaptors/cmd/cmd.go +++ b/pkg/adaptors/cmd/cmd.go @@ -26,7 +26,7 @@ type Interface interface { var defaultListenAddress = []string{"127.0.0.1:8000", "127.0.0.1:18000"} var defaultTokenCacheDir = homedir.HomeDir() + "/.kube/cache/oidc-login" -const defaultAuthenticationTimeoutSec = 60 +const defaultAuthenticationTimeoutSec = 180 // Cmd provides interaction with command line interface (CLI). type Cmd struct {