-
Notifications
You must be signed in to change notification settings - Fork 485
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
Add MinIO admin client functionality #1221
Add MinIO admin client functionality #1221
Conversation
6834f70
to
62e17cc
Compare
The integration tests are here functional/* - you can add them there. |
Excellent, I'll add them there! Will re-push some time tomorrow (I live in the U.K., so it's slightly late for me here 😄 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep MinIO Admin functionality as a separate package i.e. gradle subproject.
Agreed this is the clean approach. |
additional rollback spotless
38575c7
to
cec7c48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove gradle/wrapper/gradle-wrapper.jar
file in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments; otherwise LGTM
Please address Github workflow error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add copy right headers to all the newly added files.
strange the same test is failing on |
Hmmm, this is a bit strange, I shouldn't be: https://github.com/minio/minio-java/pull/1221/files#diff-4d85893fe8f0da0e54f6e37e5bc7ae66ae7ed183606f30081ce5b48ca8670789R31-R33 And I am just using the same accessKey/secretKey as the regular client. It's an unauthorized message, so I wonder if we are signing the request differently on a windows host? |
Github workflow on windows uses |
I'm simply re-using whatever the previous functional tests used for their user: minio-java/functional/FunctionalTest.java Lines 3863 to 3865 in 62d5c05
I'd imagine the credentials being used are stored in the circleci test, which I don't believe I cannot see. |
@harshavardhana The credential information is available at https://github.com/minio/minio-java/blob/master/build.gradle#L284 |
Let me check locally what is failing @Sam-Kramer |
Looks like all tests run fine locally
|
@harshavardhana Yep. It fails only with |
Was this ran against a local minio or against play.min.io w/ this user (https://github.com/minio/minio-java/blob/master/build.gradle#L284)? Seeing as it's an Access Denied exception, I'd imagine there's nothing wrong with the message signing itself, and rather, a permission issue? |
This is a root user - it can never return "Access Denied" @Sam-Kramer that's why I am perplexed. |
Found the problem - it is the usage of AdminClient using the signature v4 style when TLS is enabled it ends up passing UNSIGNED-PAYLOAD for i.e MinIO server expects a proper x-amz-content-sha256 value not a special string even with TLS. This is unlike S3 API behavior. If you fix that it will work fine. Additionally I am also going to allow x-amz-content-sha256 -> UNSIGNED-PAYLOAD value. |
Thanks for digging into this! Excellent, I'll fix this and push |
Take a look at the PR #1231 - these fixes should be incorporated in your build. |
I also took the opportunity to fix the MinIO build service windows runs on CI/CD - now MinIO on windows runs a local instance, instead of talking to https://play.min.io It is also doing TLS tests locally as well. |
273d2d2
408ec25
to
273d2d2
Compare
273d2d2
to
d60c2d7
Compare
Adds the following calls for MinIO Admin functionality:
I had to add a dependency on bouncy castle and implement sio-go's encryption methodology in-order to encrypt/decrypt UserInfo payloads.
Seeing as there is no integration test, I tested against my local MinIO server running on Minikube. I commented out the tests to show how/which I tested each endpoints.