I haven't tried it, but you should be able to define a Guice module that
extends the default S3 module and overrides the request signer
configuration. Then you can pass that one to the list of modules you pass
when creating the context:

@ConfiguresHttpApipublic static class S3V4SignerModule extends
S3HttpApiModule<S3Client> {
   @Override
   protected void bindRequestSigner() {
      
bind(RequestAuthorizeSignature.class).to(RequestAuthorizeSignatureV4.class).in(Scopes.SINGLETON);
   }
}
public static void main(String[] args) {
   ContextBuilder.newBuilder("s3")
      ...
      .modules(ImmutableSet.of(new S3V4SignerModule(), ...))
      ...
}

​

Make sure you annotate the custom module with "@ConfiguresHttpApi".
Can you try this?



I.


On 21 June 2018 at 11:58, Ranjith R <ranji...@gmail.com> wrote:

> I was looking at https://issues.apache.org/jira/browse/JCLOUDS-480 and it
> talks about the default signing for AWS being v4 and other s3 clones being
> v2.  I just want to know if I can use v4 for a s3 clone?  Is there any
> example that I can look at?
>
> Thanks,
> Ranjith
>
> On Mon, Jun 18, 2018 at 7:21 PM Ranjith R <ranji...@gmail.com> wrote:
>
>> Hi All - I know signature v4 signing is implemented for Amazon S3
>> (aws-s3). Just wanted to know if I can use v4 signing for a non amazon
>> cloud which supports S3 API and sigV4  (s3).  If it does, what changes
>> should be done from the client side?
>>
>> Thanks,
>> Ranjith
>>
>

Reply via email to