简体   繁体   English

如何获得 MINIO 访问权限和密钥?

[英]How can I get MINIO access and secret key?

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.我是 minio 的新手,我想在 Django 应用程序中使用它,我阅读了minio python 库的文档,并且有 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.我阅读了minio 的 Quickstart 文档,但不知道如何找到这些参数。

Go to your minio console and find Users page. Go 到您的 minio 控制台并找到用户页面。 You can create a new user and set it MINIO_ACCESS_KEY and MINIO_SECRET_KEY or can view user credentials.您可以创建一个新用户并将其设置为 MINIO_ACCESS_KEY 和 MINIO_SECRET_KEY 或者可以查看用户凭据。

AccessKey is similar to username and should be minimum of 5 characters. AccessKey 与用户名类似,至少应包含 5 个字符。 SecretKey is similar to password, it should be randomly generated and kept secure. SecretKey 类似于密码,它应该是随机生成的并保持安全。

Its called Service Accounts, Go to Users menu, then Service Accounts sub menu.它被称为服务帐户,Go 到用户菜单,然后是服务帐户子菜单。 create a new MINIO_ACCESS_KEY, MINIO_SECRET_KEY创建一个新的 MINIO_ACCESS_KEY, MINIO_SECRET_KEY

If you use docker:如果您使用 docker:

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

They are equivalent:它们是等价的:

MINIO_ACCESS_KEY=MINIO_ROOT_USER MINIO_ACCESS_KEY=MINIO_ROOT_USER

MINIO_SECRET_KEY=MINIO_ROOT_PASSWORD MINIO_SECRET_KEY=MINIO_ROOT_PASSWORD

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注意密码中的rootUser和rootPassword,您可以使用base64进行解码

$ echo bWluaW8= | base64 --decode
minioalex

$ echo bWluaW8xMjM= | base64 --decode
minio123

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过访问和密钥获取请求 - Get request with Access and Secret Key 如何在我的python应用程序中保护我的AWS访问ID和密钥 - How can I protect my AWS access id and secret key in my python application 如何使用访问密钥,秘密密钥和工作桶ID访问Amazon S3上的数据存储? - How to get access to data storage on Amazon S3 using access key, secret key and working bucket ID? 如何获取在Python中发布到Soundcloud的轨道的秘密链接? - How can I get the secret link for a track posted to Soundcloud in Python? 如何从 minio 将数据下载到 kubeflow 中的 jupyter notebook? - how can I download data to jupyter notebook in kubeflow from minio? 我们如何在不使用秘密访问密钥的情况下使用带有 IAM 角色的 boto3 连接到 Amazon CloudWatch - How can we connect to Amazon CloudWatch using boto3 with IAM role without using secret access key 如何将 AWS_ACCESS_KEY_ID 和 AWS_SECRET_ACCESS_KEY 传递给 Makefile 中的 docker run? - How do I pass AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to docker run within a Makefile? 如何验证亚马逊访问密钥和密钥是否正确? - How to validate Amazon access key and secret key is correct? 如何获取StockTwit API的访问令牌密码? - How to get access token secret for StockTwit API? 获取aws_secret_access_key存储在〜/ .boto中 - get aws_secret_access_key to store in ~/.boto
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM