You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by "Long T." <pr...@hotmail.com> on 2014/04/10 22:25:00 UTC

[AWS S3] - Is there a way I can set the S3 Server Side Encryption flag with the BlobStore?‏








Hello, I'd like to use S3's server side encryption to feature when I put the blob on S3 (http://docs.aws.amazon.com/AmazonS3/latest/dev/SSEUsingRESTAPI.html).  Is there a way to set some type of encryption flag when I put the blob onto S3 with the BlobStore APIs?  Or possibly atttach the appropriate header to the request?


Thanks,
Long T. 		 	   		  

Re: [AWS S3] - Is there a way I can set the S3 Server Side Encryption flag with the BlobStore?‏

Posted by Andrew Phillips <an...@apache.org>.
> Hello, I'd like to use S3's server side encryption to feature when I  
>  put the blob on S3   
> (http://docs.aws.amazon.com/AmazonS3/latest/dev/SSEUsingRESTAPI.html).  Is   
> there a way to set some type of encryption flag when I put the blob   
> onto S3 with the BlobStore APIs?  Or possibly atttach the   
> appropriate header to the request?

I should start off by saying that I'm not the S3 expert here ;-) But  
looking at the S3Object interface, it may be possible to:

1) Get the S3Client API from your context [1]
2) Create a new S3Object [2]
3) Update the headers on the S3Object using getAllHeaders/setAllHeaders [3]
4) PUT the S3Object [4]

This does not use the portable BlobStore API, though - I can't see an  
obvious way this would be supported there. That doesn't seem too  
unreasonable, though, seeing as this is a provider-specific feature.

If you get a chance to try the above steps out, please let us know if  
they work for you!

ap

[1] https://wiki.apache.org/jclouds/Core%20Concepts - see "You can use  
API-specific calls where needed"
[2]  
http://javadocs.jclouds.cloudbees.net/org/jclouds/s3/S3Client.html#newS3Object()
[3]  
http://javadocs.jclouds.cloudbees.net/org/jclouds/s3/domain/S3Object.html#setAllHeaders(com.google.common.collect.Multimap)
[4]  
http://javadocs.jclouds.cloudbees.net/org/jclouds/s3/S3Client.html#putObject(java.lang.String, org.jclouds.s3.domain.S3Object,  
org.jclouds.s3.options.PutObjectOptions...)

Re: [AWS S3] - Is there a way I can set the S3 Server Side Encryption flag with the BlobStore?‏

Posted by Andrew Phillips <an...@apache.org>.
> I do not believe the portable abstraction should expose this and the
> provider-specific interface does not support this today.  I opened a
> JIRA issue and submitted a pull request which adds provider-specific
> support:
>
> https://issues.apache.org/jira/browse/JCLOUDS-533
> https://github.com/jclouds/jclouds/pull/344

Thanks, gaul!

ap

Re: [AWS S3] - Is there a way I can set the S3 Server Side Encryption flag with the BlobStore?‏

Posted by Andrew Gaul <ga...@apache.org>.
On Thu, Apr 10, 2014 at 01:25:00PM -0700, Long T. wrote:
> Hello, I'd like to use S3's server side encryption to feature when I
> put the blob on S3
> (http://docs.aws.amazon.com/AmazonS3/latest/dev/SSEUsingRESTAPI.html).
> Is there a way to set some type of encryption flag when I put the blob
> onto S3 with the BlobStore APIs?  Or possibly atttach the appropriate
> header to the request?

I do not believe the portable abstraction should expose this and the
provider-specific interface does not support this today.  I opened a
JIRA issue and submitted a pull request which adds provider-specific
support:

https://issues.apache.org/jira/browse/JCLOUDS-533
https://github.com/jclouds/jclouds/pull/344

-- 
Andrew Gaul
http://gaul.org/