-
Notifications
You must be signed in to change notification settings - Fork 153
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
implement auth middleware for s3 #3102
Conversation
96f2b77
to
ca786b3
Compare
After the review I noticed that upstream exposes some of this functionality: We may benefit from using their implementation for the signing and verification part. They also have a middleware implementation, but I am not sure how useful that would be for us. |
Here's some background. |
@chanwit thank you for the context. Unfortunately neither MiniIO nor AWS seems to expose the entire logic, so it does make sense the approach. |
d72b34b
to
784eb3c
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.
LGTM
thanks @chanwit! 🙇
4c59194
to
9a529d9
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.
Tested it locally with:
AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=some_secret_key ./bin/gitops-bucket-server --cert-file ~/dev/local-ca/ca.pem --key-file ~/dev/local-ca/ca.key
and the minio CLI:
$ mc alias set test https://localhost:9443 foo some_secret_key --insecure
Added `test` successfully.
$ $ /tmp/mc ls test --insecure
[2022-12-05 10:48:01 CET] 0B probe-bucket-sign-gza44hmacqgz/
[2022-12-05 10:48:29 CET] 0B minio/
[2022-12-05 10:55:29 CET] 0B probe-bucket-sign-wt0spypubjre/
Works fine, good job!
Just a remark on picking a different package name for the middleware code.
105617c
to
23f8957
Compare
Signed-off-by: Chanwit Kaewkasi <[email protected]>
Signed-off-by: Chanwit Kaewkasi [email protected]