-
Notifications
You must be signed in to change notification settings - Fork 8
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
Introduce Glue protocol module #169
Conversation
28f0b05
to
e0bc180
Compare
763cdce
to
09d5c7f
Compare
e0bc180
to
8537302
Compare
4cb1617
to
21ef861
Compare
8537302
to
5e6c612
Compare
trino-aws-proxy-glue/src/main/java/io/trino/aws/proxy/glue/rest/ModelLoader.java
Outdated
Show resolved
Hide resolved
trino-aws-proxy-glue/src/main/java/io/trino/aws/proxy/glue/TrinoGlueModule.java
Show resolved
Hide resolved
trino-aws-proxy/src/main/java/io/trino/aws/proxy/server/rest/ResourceSecurity.java
Outdated
Show resolved
Hide resolved
trino-aws-proxy-glue/src/main/java/io/trino/aws/proxy/glue/TrinoStandaloneGlueModule.java
Show resolved
Hide resolved
trino-aws-proxy-spi/src/main/java/io/trino/aws/proxy/spi/signing/SigningServiceType.java
Outdated
Show resolved
Hide resolved
trino-aws-proxy-glue/src/main/java/io/trino/aws/proxy/glue/rest/SerializerCommon.java
Outdated
Show resolved
Hide resolved
5e6c612
to
b388c07
Compare
New module that implements a Glue REST API endpoint allowing Glue proxying/emulation. - Adds serializers/deserializers for all Glue models - Glue REST endpoint that marshals request payloads - Injectable request handler - Could be the basis of a Glue proxy, though this isn't implemented currently - Can be run as a standalone Glue endpoint handler - Can be add Glue endpoint to AWS S3 proxy as standard plugin
b388c07
to
35283c4
Compare
trino-aws-proxy-glue/src/main/java/io/trino/aws/proxy/glue/rest/ModelLoader.java
Show resolved
Hide resolved
{ | ||
requestLoggingSession.logProperty("request.glue.emulated.key", signingMetadata.credentials().emulated().secretKey()); | ||
|
||
String target = request.requestHeaders().unmodifiedHeaders().getFirst("x-amz-target") |
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.
I am not familiar with Glue, but it seems x-amz-target is not documented.
Does Glue do something like graphql, using only 1 path and setting the action/request with this header?
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.
I determined this ad-hoc by running tests with the AWS CLI and the Glue Java client. I'll try to find some doc for it.
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.
You can see it in the Javascript code. https://github.com/aws/aws-sdk-js/blob/966fa6c316dbb11ca9277564ff7120e6b16467f4/lib/protocol/json.js#L26
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.
Then, here is the "api" for Glue. Notice is all POST: https://github.com/aws/aws-sdk-js/blob/master/apis/glue-2017-03-31.normal.json. And the protocol:
"protocols": [
"json"
],
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.
Interesting. I guess if it works it works
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.
¯\(ツ)/¯
New module that implements a Glue REST API endpoint allowing Glue proxying/emulation.
ReadMe: https://github.com/trinodb/aws-proxy/blob/jordanz/glue/trino-aws-proxy-glue/README.md