Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minio custom access keys won't allow login to dashboard #3478

Closed
jbmcfarlin31 opened this issue Jul 18, 2019 · 5 comments · Fixed by #3503
Closed

Minio custom access keys won't allow login to dashboard #3478

jbmcfarlin31 opened this issue Jul 18, 2019 · 5 comments · Fixed by #3503

Comments

@jbmcfarlin31
Copy link
Contributor

jbmcfarlin31 commented Jul 18, 2019

Is this a bug report or feature request?

  • Bug Report

Bug Report
When using a custom generated access key and secret key to access the minio object store, I get an error saying The access key ID you provided does not exist in our records.

Expected behavior:
I would be able to login with the generated access keys.

Deviation from expected behavior:
I was deploying the sample code from the cluster/examples/kubernetes/minio directory. The only thing that was modified was the secret containing the username and password fields (respectively access key and secret key used for minio). I then changed the storage class to be what I am using (in this case rook-ceph).

How to reproduce it (minimal and precise):

I just kubectl create -f operator.yaml and waited for it to come up. Then when it was successful I did a kubectl create -f object-store.yaml ensuring to enter my new credentials as base64 encoded values.

The my-store-x pods came up, I was able to access my minio dashboard via my ingress rule that I defined for it, and upon trying to login to the dashboard with the generated credentials I get the error mentioned above.

Nothing shows in the operator log or the my-store-x pods.

I took the same object-store.yaml file and left the default values for credentials ("TEMP_DEMO_ACCESS_KEY and TEMP_DEMO_SECRET_KEY") and redeployed after deleting everything and was able to login.

I should also note that with the custom credentials, I see them in the pods and statefulset as ENV vars with the correct values.

File(s) to submit:

  • Cluster CR (custom ressource), typically called cluster.yaml, if necessary
  • Operator's logs, if necessary
  • Crashing pod(s) logs, if necessary

To get logs, use kubectl -n <namespace> logs <pod name>
When pasting logs, always surround them with backticks or use the insert code button from the Github UI.
Read Github documentation if you need help.

Environment:

  • OS (e.g. from /etc/os-release): Ubuntu 16.04
  • Kernel (e.g. uname -a):
  • Cloud provider or hardware configuration: Azure Stack
  • Rook version (use rook version inside of a Rook Pod): v0.9.3
  • Storage backend version (e.g. for ceph do ceph -v): ceph 0.9.3
  • Kubernetes version (use kubectl version): 1.13.5
  • Kubernetes cluster type (e.g. Tectonic, GKE, OpenShift): RKE
  • Storage backend status (e.g. for Ceph use ceph health in the Rook Ceph toolbox):
@jbmcfarlin31
Copy link
Contributor Author

Got this resolved. I actually found the fix for it on the minio/minio github project as a related issue. The problem seemed to be that when base64 encoding the values, you need to be sure that newlines and feeds do not get into it. I am not sure how that occurred for me but my command looked something like echo "supsersecretpassword" | base64 and that was failing.

What I had to do instead was:

$ cat minio-object-store.yml
...
apiVersion: v1
kind: Secret
metadata:
  name: minio-access-keys
  namespace: minio
type: Opaque
data:
  MINIO_ACCESS_KEY: #1
  MINIO_SECRET_KEY: #2
...
$ MINIO_ACCESS_KEY=$(echo -n "username" | base64 -w0)
$ MINIO_SECRET_KEY=$(echo -n "password" | base64 -w0)
$ sed -i "s/#1/$MINIO_ACCESS_KEY/g" minio-object-store.yml
$ sed -i "s/#2/$MINIO_SECRET_KEY/g" minio-object-store.yml

The link for the fix can be found here: Using Env vars for Minio Access/Secret Keys.

Hope this helps some folks!

@galexrt
Copy link
Member

galexrt commented Jul 22, 2019

@jbmcfarlin31 Would you be up to document on Rook's side so other people are not running into this as well? 🙂

@jbmcfarlin31
Copy link
Contributor Author

@galexrt Sure, I don't mind at all! Please let me know where to go / what to do and I will get started on it.

@galexrt
Copy link
Member

galexrt commented Jul 22, 2019

jbmcfarlin31 pushed a commit to jbmcfarlin31/rook that referenced this issue Jul 23, 2019
creating custom access/secret keys without properly base64 encoding them resulted in failed access to minio dashboard

Signed-off-by: jbmcfar <jbmcfar@sandia.gov>
@jbmcfarlin31
Copy link
Contributor Author

@galexrt I just submitted the PR today. Please let me know if anything needs to change.

galexrt added a commit that referenced this issue Sep 23, 2019
minio: update documentation in regards to #3478
leseb pushed a commit to leseb/rook that referenced this issue Oct 3, 2019
creating custom access/secret keys without properly base64 encoding them resulted in failed access to minio dashboard

Signed-off-by: jbmcfar <jbmcfar@sandia.gov>
sabbot pushed a commit to sabbot/rook that referenced this issue Oct 17, 2019
creating custom access/secret keys without properly base64 encoding them resulted in failed access to minio dashboard

Signed-off-by: jbmcfar <jbmcfar@sandia.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants