-
Notifications
You must be signed in to change notification settings - Fork 7
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 support for request signing #6
Conversation
35b43f2
to
80cf3c2
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.
Generally, lets reformat this code to the Trino style, and update it to Java 22 style. Also, let's rename all of the minio stuff to something else. I think in most cases it can be s3
or aws
. I also think we can drop the interfaces unless we need to have multiple implementations
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/credentials/Credentials.java
Outdated
Show resolved
Hide resolved
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/minio/Digest.java
Outdated
Show resolved
Hide resolved
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/minio/Digest.java
Outdated
Show resolved
Hide resolved
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/minio/Digest.java
Outdated
Show resolved
Hide resolved
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/minio/Digest.java
Outdated
Show resolved
Hide resolved
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/minio/S3Escaper.java
Outdated
Show resolved
Hide resolved
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/minio/S3Escaper.java
Outdated
Show resolved
Hide resolved
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/minio/Signer.java
Outdated
Show resolved
Hide resolved
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/minio/emulation/MinioRequestImpl.java
Outdated
Show resolved
Hide resolved
trino-s3-proxy/src/main/java/io/trino/s3/proxy/server/minio/emulation/MinioUrlImpl.java
Outdated
Show resolved
Hide resolved
3d80dcf
to
4245318
Compare
@dain do you mean rename the Minio classes I copied or do you mean the two shim classes I created? I'm not sure what you're referring to. |
I'd rename all of them. This isn't a minio proxy but s3 stuff. Or said another way, I don't think we need or want to follow the minio code, we just want a one time copy and we should clean it up completely and make it match the Trino style. |
4245318
to
44b8194
Compare
OK - I'll do a pass over that. My only concern is potential bug fixes but it's probably not a big problem. |
44b8194
to
d535abb
Compare
@dain I did a major refactor of the Minio classes. Only 1 is left and it's a simple util. PTAL |
94fa65c
to
0287a5f
Compare
Hey folks - it turns out the signing code can be done with AWS SDK methods. I removed the Minio code. |
ec39d06
to
5787e06
Compare
- Use AWS SDK signing code - Added an initial test for a simple `aws s3 ls` based on this doc: https://min.io/docs/minio/linux/integrations/aws-cli-with-minio.html Closes #5
5787e06
to
fa2de77
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.
This is much simpler!
Clock clock = Clock.fixed(zonedDateTime.toInstant(), zonedDateTime.getZone()); | ||
signerParamsBuilder.signingClockOverride(clock); | ||
|
||
// TODO - only allow a configured time window for the request |
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.
Let's do this sooner rather than later
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.
aws s3 ls
based on this doc: https://min.io/docs/minio/linux/integrations/aws-cli-with-minio.htmlCloses #5