Pass environment variable to control session length to console (#17885)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia 2023-08-21 11:55:43 -07:00 committed by GitHub
parent c3c8441a1d
commit 328cb0a076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -175,6 +175,10 @@ func minioConfigToConsoleFeatures() {
if value := env.Get(config.EnvBrowserLoginAnimation, "on"); value != "" {
os.Setenv("CONSOLE_ANIMATED_LOGIN", value)
}
// Pass on the session duration environment variable, else we will default to 12 hours
if value := env.Get(config.EnvBrowserSessionDuration, ""); value != "" {
os.Setenv("CONSOLE_STS_DURATION", value)
}
os.Setenv("CONSOLE_MINIO_REGION", globalSite.Region)
os.Setenv("CONSOLE_CERT_PASSWD", env.Get("MINIO_CERT_PASSWD", ""))

View File

@ -61,10 +61,11 @@ const (
EnvMinIOCallhomeEnable = "MINIO_CALLHOME_ENABLE"
EnvMinIOCallhomeFrequency = "MINIO_CALLHOME_FREQUENCY"
EnvMinIOServerURL = "MINIO_SERVER_URL"
EnvBrowserRedirectURL = "MINIO_BROWSER_REDIRECT_URL"
EnvRootDiskThresholdSize = "MINIO_ROOTDISK_THRESHOLD_SIZE"
EnvBrowserLoginAnimation = "MINIO_BROWSER_LOGIN_ANIMATION"
EnvMinIOServerURL = "MINIO_SERVER_URL"
EnvBrowserRedirectURL = "MINIO_BROWSER_REDIRECT_URL"
EnvRootDiskThresholdSize = "MINIO_ROOTDISK_THRESHOLD_SIZE"
EnvBrowserLoginAnimation = "MINIO_BROWSER_LOGIN_ANIMATION"
EnvBrowserSessionDuration = "MINIO_BROWSER_SESSION_DURATION"
EnvUpdate = "MINIO_UPDATE"