Minio: Handle wrong formatted MINIO_ACCESS_KEY

Created on 16 Mar 2019  路  3Comments  路  Source: minio/minio

minio does not complain about an access key like "bWluaW8=". Instead, it returns 400 on any request.

Expected Behavior

If an access key like "bWluaW8=" is not allowed, minio should complain during startup phase. Additionally, the returned error should be self-explanatory, e.g. "The access key provided contains bad characters".

Current Behavior

minio does not complain about an access key like "bWluaW8=". Instead, it returns 400 on any request.

mc: <ERROR> Unable to initialize new config from the provided credentials. Missing fields in request.

Server side error log:

[RESPONSE] [155274006.544475] [2019-03-16 12:41:05 +0000]
400 Bad Request
X-Xss-Protection: 1; mode=block
Content-Security-Policy: block-all-mixed-content
X-Amz-Request-Id: 158C70DCDD58DD48
X-Minio-Deployment-Id: 636d5d4a-20f6-40a6-bc58-792156c2cc01
Server: Minio/RELEASE.2019-03-13T21-59-47Z
Accept-Ranges: bytes
Content-Type: application/xml
Vary: Origin

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>MissingFields</Code><Message>Missing fields in request.</Message><BucketName>probe-bucket-sign-diizp61djrhh</BucketName><Resource>/probe-bucket-sign-diizp61djrhh/</Resource><RequestId>158C70DCDD58DD48</RequestId><HostId>636d5d4a-20f6-40a6-bc58-792156c2cc01</HostId></Error>

Currently, a non well formatted access key leads to non-concluding errrors.

Steps to Reproduce (for bugs)

  1. Configure access key like "bWluaW8="
  2. Start minio
  3. Add the host usingmc config host add server http://minio:9000 bWluaW8= test1230912384231 --api S3v4
  4. Run any mccommand against the host

Your Environment

  • Version used (minio version): minio/minio:RELEASE.2019-03-13T21-59-47Z
  • MC version used: Version: 2019-03-13T21:05:06Z
  • Environment name and version: docker-1.13.1-65.git1185cfd.fc29.x86_64
  • Operating System and version (uname -a): Fedora 29 4.18.16-300.fc29.x86_64
community fixed medium

Most helpful comment

@maltefiala Thanks for reporting this issue, a PR has been sent to fix this issue.

All 3 comments

@maltefiala Thanks for reporting this issue, a PR has been sent to fix this issue.

Wow, thank you for this more than fast response! That's really great work on your side!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings