How can I get MINIO access and secret key?
Asked Answered
D

7

24

I'm new to minio and I want to use it in a Django app, I read the documentation of minio python library and there is fields for MINIO_ENDPOINT, MINIO_ACCESS_KEY, MINIO_SECRET_KEY. I read the Quickstart documentation of minio but I didn't figure out how to find these parameters.

Dulcia answered 27/4, 2021 at 15:8 Comment(1)
minio defaults to minioadmin and minioadmin as the access key and secret key respectively. When you login change those.Zora
B
35

If you use docker:

environment:
            MINIO_ROOT_USER: ${MINIO_ROOT_USER}
            MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}

Note that these two equivalent variables are now deprecated:

MINIO_ACCESS_KEY[=MINIO_ROOT_USER]

MINIO_SECRET_KEY[=MINIO_ROOT_PASSWORD]

Bombproof answered 31/5, 2022 at 12:5 Comment(1)
This naming convention took me an two hours to figure out.Relator
S
14

Go to your minio console and find Users page. You can create a new user and set it MINIO_ACCESS_KEY and MINIO_SECRET_KEY or can view user credentials.

Scibert answered 21/8, 2021 at 21:42 Comment(2)
Note that your policy must allow for credentials reset, the default policy consoleAdmin allows for that.Ezmeralda
These variables are deprecated: min.io/docs/minio/linux/administration/…. @Bombproof 's answer shows the current variables. Also, if not set, it defaults to minioadmin value which is discouraged.Fic
Z
2

AccessKey is similar to username and should be minimum of 5 characters. SecretKey is similar to password, it should be randomly generated and kept secure.

Zerline answered 20/9, 2021 at 8:55 Comment(2)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Scientist
if they are similar, what is the point? What is the difference between access key and username?Cartridge
R
2

Its called Service Accounts, Go to Users menu, then Service Accounts sub menu. create a new MINIO_ACCESS_KEY, MINIO_SECRET_KEY

Ramayana answered 14/5, 2022 at 12:20 Comment(0)
S
1

Please follow path:

  1. Login to Minio
  2. Access Keys
  3. Create Access Key

At this location you will see the access key and secret key.

If you want to create new, click on Create button.

Create access key

Superordinate answered 12/12, 2023 at 10:35 Comment(0)
D
0

From the cluster

kubectl get secrets
NAME                              TYPE                                  DATA   AGE
default-token-hxzsv               kubernetes.io/service-account-token   3      5h34m
minio-sa-token-nxdpt              kubernetes.io/service-account-token   3      14m
mino-test-minio                   Opaque                                2      14m
my-s3-keys                        Opaque                                2      3h33m
mypostgres-secret                 Opaque                                2      5h20m
sh.helm.release.v1.mino-test.v1   helm.sh/release.v1                    1      14m
alex@pop-os:~/coding/preso_hive$ kubectl get secret mino-test-minio -o yaml
apiVersion: v1
data:
  rootPassword: bWluaW8xMjM=
  rootUser: bWluaW8=
kind: Secret
metadata:
  annotations:
    meta.helm.sh/release-name: mino-test
    meta.helm.sh/release-namespace: default
  creationTimestamp: "2022-06-14T10:15:14Z"
  labels:
    app: minio
    app.kubernetes.io/managed-by: Helm
    chart: minio-4.0.2
    heritage: Helm
    release: mino-test
  name: mino-test-minio
  namespace: default
  resourceVersion: "58285"
  uid: c23ce2d4-657e-4feb-adea-df83bba489c5
type: Opaque

Note the rootUser and rootPassword from the secret and you can use base64 to decode

$ echo bWluaW8= | base64 --decode
minioalex

$ echo bWluaW8xMjM= | base64 --decode
minio123
Drayton answered 14/6, 2022 at 10:35 Comment(0)
T
0

If you have installed the Milvus database and looking for Milvus MinIO "Access Key" and "Secret Key" to log in to http://IP_Address:9000 below are the default details:

Access Key: minioadmin
Secret Key: minioadmin
Turco answered 25/10, 2023 at 12:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.