feat(auth): implement SigV4 authentication for REST catalog#616
Conversation
d1c0732 to
4326282
Compare
8f61d0e to
655be23
Compare
wgtmac
left a comment
There was a problem hiding this comment.
Thanks for adding this! I have just completed the architectural review and didn't fully review the sigv4 manager yet. I have some preliminary questions here:
- Should we also be compatible to the legacy
rest.sigv4-enabled=trueconfig (and others) when creating a auth manager? - How is this tested e2e? Any chance to have an integration test?
@wgtmac Thanks for taking a look! |
cb4387f to
6fda557
Compare
|
Thanks for the update! I'll go through it again and perhaps polish some design on my end. Have you ever tested it against a real AWS environment? How can we ensure it works and won't break in the future? |
Simplify AWS SDK wiring, remove premature session-cache plumbing, tighten credential validation, and strengthen SigV4 tests.
wgtmac
left a comment
There was a problem hiding this comment.
Thanks for working on this PR, @plusplusjiajia!
I have pushed a commit for cleanup. I think this PR still has some design issues, especially around REST catalog session and table-level auth. I have to admit that current REST catalog design has some obvious drawbacks which make it hard to support contextual sessions. So let’s keep this PR focused for now. I may follow up with a separate PR to address the design issues around REST catalog.
|
Thanks @wgtmac for the thorough review and the polish pass, and everyone else for the feedback along the way — much appreciated! |
Implement AWS SigV4 authentication for the REST catalog client, following Java's
RESTSigV4AuthManagerandRESTSigV4AuthSession.AuthSession::Authenticate()withHTTPRequestContext(method, url, body) for SigV4 request signingSigV4AuthSession: delegate-first auth → relocate conflicting Authorization header → sign with AWS SDKSigV4AuthManager: wraps delegate AuthManager (default OAuth2), resolves credentials from properties or default chainSignerChecksumParamsoutput: empty body → hexEMPTY_BODY_SHA256; non-empty body →Base64(SHA256(body))