minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.89k stars 553 forks source link

How to use mc without hardcoding access and secret key into config file #5056

Closed scherepanov closed 2 months ago

scherepanov commented 2 months ago

Expected behavior

I have access and secret key, and I do not want/cannot put them into file on disk. I need to specify access and secret key as parameters to mc. Specified access and secret key will override what is hardcoded in alias. Primary goal is to avoid having sensitive information in file on disk (.mc/config.json). Secondary goal is to use very many pairs access key - secret key, without creating million of aliases.

Actual behavior

mc require alias that is stored in file on disk and has hardcoded access and secret key

Steps to reproduce the behavior

Check content of file .mc/config.json

mc --version

System information

Linux

klauspost commented 2 months ago

You can configure mc using an env var: https://min.io/docs/minio/linux/reference/minio-mc/minio-client-settings.html#examples

scherepanov commented 2 months ago

@klauspost thanks for taking time and answering my question. Yes that will work perfectly well.