mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-21 09:31:19 +02:00
feat: add support for a credentials chain for minio access (#31051)
We wanted to be able to use the IAM role provided by the EC2 instance metadata in order to access S3 via the Minio configuration. To do this, a new credentials chain is added that will check the following locations for credentials when an access key is not provided. In priority order, they are: 1. MINIO_ prefixed environment variables 2. AWS_ prefixed environment variables 3. a minio credentials file 4. an aws credentials file 5. EC2 instance metadata
This commit is contained in:
@@ -1872,7 +1872,10 @@ LEVEL = Info
|
||||
;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
|
||||
;MINIO_ENDPOINT = localhost:9000
|
||||
;;
|
||||
;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
|
||||
;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`.
|
||||
;; If not provided and STORAGE_TYPE is `minio`, will search for credentials in known
|
||||
;; environment variables (MINIO_ACCESS_KEY_ID, AWS_ACCESS_KEY_ID), credentials files
|
||||
;; (~/.mc/config.json, ~/.aws/credentials), and EC2 instance metadata.
|
||||
;MINIO_ACCESS_KEY_ID =
|
||||
;;
|
||||
;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
|
||||
@@ -2573,7 +2576,10 @@ LEVEL = Info
|
||||
;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
|
||||
;MINIO_ENDPOINT = localhost:9000
|
||||
;;
|
||||
;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
|
||||
;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`.
|
||||
;; If not provided and STORAGE_TYPE is `minio`, will search for credentials in known
|
||||
;; environment variables (MINIO_ACCESS_KEY_ID, AWS_ACCESS_KEY_ID), credentials files
|
||||
;; (~/.mc/config.json, ~/.aws/credentials), and EC2 instance metadata.
|
||||
;MINIO_ACCESS_KEY_ID =
|
||||
;;
|
||||
;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
|
||||
|
Reference in New Issue
Block a user