ShivanshhhG commented on code in PR #17914:
URL: https://github.com/apache/iceberg/pull/17914#discussion_r4246568118
##########
aws/src/main/java/org/apache/iceberg/aws/s3/signer/S3V4RestSignerClient.java:
##########
@@ -400,11 +400,19 @@ interface Key {
String uri();
- static Key from(RemoteSignRequest request) {
+ @Nullable
+ String credential();
+
+ @Nullable
+ String token();
+
+ static Key from(RemoteSignRequest request, S3V4RestSignerClient
signerClient) {
return ImmutableKey.builder()
.method(request.method())
.region(request.region())
.uri(request.uri().toString())
+ .credential(signerClient.credential())
+ .token(signerClient.token().get())
Review Comment:
Thanks @yangshangqing95! That made total sense - I adopted your suggestion
and switched `signedComponentCache` to be a per-instance `@Value.Lazy` cache on
`S3V4RestSignerClient`.
That cleanly isolates the cache structurally per client instance without
needing to store credentials/tokens in a static key. Also added an end-to-end
regression test (`doesNotReuseSignedComponentAcrossSignerClients`) verifying
that two separate client instances don't share cached signatures.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]