github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/internal/config/constants.go (about)

     1  // Copyright (c) 2015-2021 MinIO, Inc.
     2  //
     3  // This file is part of MinIO Object Storage stack
     4  //
     5  // This program is free software: you can redistribute it and/or modify
     6  // it under the terms of the GNU Affero General Public License as published by
     7  // the Free Software Foundation, either version 3 of the License, or
     8  // (at your option) any later version.
     9  //
    10  // This program is distributed in the hope that it will be useful
    11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  // GNU Affero General Public License for more details.
    14  //
    15  // You should have received a copy of the GNU Affero General Public License
    16  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  
    18  package config
    19  
    20  // Config value separator
    21  const (
    22  	ValueSeparator = ","
    23  )
    24  
    25  // Top level common ENVs
    26  const (
    27  	EnvAccessKey    = "MINIO_ACCESS_KEY"
    28  	EnvSecretKey    = "MINIO_SECRET_KEY"
    29  	EnvRootUser     = "MINIO_ROOT_USER"
    30  	EnvRootPassword = "MINIO_ROOT_PASSWORD"
    31  
    32  	// Legacy files
    33  	EnvAccessKeyFile = "MINIO_ACCESS_KEY_FILE"
    34  	EnvSecretKeyFile = "MINIO_SECRET_KEY_FILE"
    35  
    36  	// Current files
    37  	EnvRootUserFile     = "MINIO_ROOT_USER_FILE"
    38  	EnvRootPasswordFile = "MINIO_ROOT_PASSWORD_FILE"
    39  
    40  	// Set all config environment variables from 'config.env'
    41  	// if necessary. Overrides all previous settings and also
    42  	// overrides all environment values passed from
    43  	// 'podman run -e ENV=value'
    44  	EnvConfigEnvFile = "MINIO_CONFIG_ENV_FILE"
    45  
    46  	EnvBrowser    = "MINIO_BROWSER"
    47  	EnvDomain     = "MINIO_DOMAIN"
    48  	EnvPublicIPs  = "MINIO_PUBLIC_IPS"
    49  	EnvFSOSync    = "MINIO_FS_OSYNC"
    50  	EnvArgs       = "MINIO_ARGS"
    51  	EnvVolumes    = "MINIO_VOLUMES"
    52  	EnvDNSWebhook = "MINIO_DNS_WEBHOOK_ENDPOINT"
    53  
    54  	EnvSiteName   = "MINIO_SITE_NAME"
    55  	EnvSiteRegion = "MINIO_SITE_REGION"
    56  
    57  	EnvMinIOSubnetLicense = "MINIO_SUBNET_LICENSE" // Deprecated Dec 2021
    58  	EnvMinIOSubnetAPIKey  = "MINIO_SUBNET_API_KEY"
    59  	EnvMinIOSubnetProxy   = "MINIO_SUBNET_PROXY"
    60  
    61  	EnvMinIOCallhomeEnable    = "MINIO_CALLHOME_ENABLE"
    62  	EnvMinIOCallhomeFrequency = "MINIO_CALLHOME_FREQUENCY"
    63  
    64  	EnvMinIOServerURL             = "MINIO_SERVER_URL"
    65  	EnvBrowserRedirect            = "MINIO_BROWSER_REDIRECT" // On by default
    66  	EnvBrowserRedirectURL         = "MINIO_BROWSER_REDIRECT_URL"
    67  	EnvRootDriveThresholdSize     = "MINIO_ROOTDRIVE_THRESHOLD_SIZE"
    68  	EnvRootDiskThresholdSize      = "MINIO_ROOTDISK_THRESHOLD_SIZE" // Deprecated Sep 2023
    69  	EnvBrowserLoginAnimation      = "MINIO_BROWSER_LOGIN_ANIMATION"
    70  	EnvBrowserSessionDuration     = "MINIO_BROWSER_SESSION_DURATION" // Deprecated after November 2023
    71  	EnvMinioStsDuration           = "MINIO_STS_DURATION"
    72  	EnvMinIOLogQueryURL           = "MINIO_LOG_QUERY_URL"
    73  	EnvMinIOLogQueryAuthToken     = "MINIO_LOG_QUERY_AUTH_TOKEN"
    74  	EnvMinIOPrometheusURL         = "MINIO_PROMETHEUS_URL"
    75  	EnvMinIOPrometheusJobID       = "MINIO_PROMETHEUS_JOB_ID"
    76  	EnvMinIOPrometheusExtraLabels = "MINIO_PROMETHEUS_EXTRA_LABELS"
    77  	EnvMinIOPrometheusAuthToken   = "MINIO_PROMETHEUS_AUTH_TOKEN"
    78  
    79  	EnvUpdate = "MINIO_UPDATE"
    80  
    81  	EnvEndpoints  = "MINIO_ENDPOINTS"   // legacy
    82  	EnvWorm       = "MINIO_WORM"        // legacy
    83  	EnvRegion     = "MINIO_REGION"      // legacy
    84  	EnvRegionName = "MINIO_REGION_NAME" // legacy
    85  
    86  )
    87  
    88  // Expiration Token durations
    89  // These values are used to validate the expiration time range from
    90  // either the exp claim or MINI_STS_DURATION value
    91  const (
    92  	MinExpiration = 900
    93  	MaxExpiration = 31536000
    94  )