aws / aws/aws-sdk-java-v2

S3 SDK: S3CopyObjectOperation does not allow setting SSE-S3

Aperta
#1,868 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
service-api service:s3
Lingua principale
Java
Stelle
2.6k
Fork
1k
Merge medio
2g 9h
PR unite (30g)
51

Descrizione

It's not currently possible to enable [SSE-S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) as part of an S3CopyObjectOperation. There only appears to be support for [SSE-KMS](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) via the `.sseAwsKmsKeyId()` method on the builder.

## Describe the Feature
Add the ability to specify SSE-S3 as part of an S3CopyObjectOperation.

## Is your Feature Request related to a problem?
I want to programmatically encrypt all existing objects within a bucket and remove unencrypted versions of the objects, before enabling default encryption on the bucket and applying an "encryption only" policy, to ensure that nothing in the bucket is not encrypted at rest.

## Proposed Solution
Provide a new `.enableSSES3()` method on the builder.

## Describe alternatives you've considered
One-by-one copy of the latest version of each object.

## Additional Context

I'm currently using v1 of the SDK and hit this problem https://github.com/aws/aws-sdk-java/issues/1301 so tried out v2 of the SDK which still didn't solve my problem.

- [ ] I may be able to implement this feature request

## Your Environment

* AWS Java SDK version used: 2.13.26
* JDK version used: 1.8.0_252
* Operating System and version: macOS 10.15.5

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da S3CopyObjectOperation e dal relativo builder, poi segui il percorso esistente di sseAwsKmsKeyId() per capire come le opzioni di crittografia della copia arrivano a S3. Aggiungi la funzionalità richiesta enableSSES3() e verifica che un’operazione di copia invii l’impostazione SSE-S3; poiché l’issue non indica alcun test, individua i test pertinenti dell’operazione o del builder prima di eseguirli.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, java
Ambito
backend, cloud
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.