Secret key prompt (#3083)

This commit is contained in:
Jeffrey Clark
2020-03-14 00:03:44 -07:00
committed by GitHub
parent 5b5d65a142
commit bcbbfa7352
5 changed files with 173 additions and 22 deletions
+33 -4
View File
@@ -99,14 +99,35 @@ MinIO server displays URL, access and secret keys.
#### Usage
```
mc config host add <ALIAS> <YOUR-MINIO-ENDPOINT> <YOUR-ACCESS-KEY> <YOUR-SECRET-KEY>
mc config host add <ALIAS> <YOUR-MINIO-ENDPOINT> [YOUR-ACCESS-KEY] [YOUR-SECRET-KEY]
```
Keys must be supplied by argument or standard input.
Alias is simply a short name to your MinIO service. MinIO end-point, access and secret keys are supplied by your MinIO service. Admin API uses "S3v4" signature and cannot be changed.
```
mc config host add minio http://192.168.1.51:9000 BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12
```
### Examples
1. Keys by argument
```
mc config host add minio http://192.168.1.51:9000 BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12
```
2. Keys by prompt
```
mc config host add minio http://192.168.1.51:9000
Enter Access Key: BKIKJAA5BMMU2RHO6IBB
Enter Secret Key: V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12
```
2. Keys by pipe
```
echo -e "BKIKJAA5BMMU2RHO6IBB\nV7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12" | \
mc config host add minio http://192.168.1.51:9000
```
## 4. Test Your Setup
@@ -439,6 +460,14 @@ COMMANDS:
mc admin user add myminio/ newuser newuser123
```
*Example: Add a new user 'newuser' on MinIO, using standard input.*
```
mc admin user add myminio/
Enter Access Key: newuser
Enter Secret Key: newuser123
```
*Example: Disable a user 'newuser' on MinIO.*
```