jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [jclouds] gaul commented on a change in pull request #43: JCLOUDS-1511: allow configuration of S3 to use V4 signatures
Date Thu, 05 Sep 2019 01:07:10 GMT
gaul commented on a change in pull request #43: JCLOUDS-1511: allow configuration of S3 to
use V4 signatures
URL: https://github.com/apache/jclouds/pull/43#discussion_r321037581
 
 

 ##########
 File path: apis/s3/src/main/java/org/jclouds/s3/config/S3HttpApiModule.java
 ##########
 @@ -183,8 +184,11 @@ protected void bindErrorHandlers() {
       bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(ParseS3ErrorFromXmlContent.class);
    }
 
-   protected void bindRequestSigner() {
-      bind(RequestAuthorizeSignature.class).to(RequestAuthorizeSignatureV2.class).in(Scopes.SINGLETON);
+   @Provides
+   @Singleton
+   protected RequestAuthorizeSignature bindRequestSigner(
+           @Named(S3Constants.PROPERTY_S3_V4_REQUEST_SIGNATURES) boolean v4Signatures, Injector
injector) {
+      return injector.getInstance(v4Signatures ? RequestAuthorizeSignatureV4.class : RequestAuthorizeSignatureV2.class);
 
 Review comment:
   I believe that there are two signing mechanisms: one for general URLs, and one for pre-signed
URLs which the application server can give to partially-trusted clients.  For consistency
we should use the same signer for both.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message