aws / aws/amazon-s3-encryption-client-java
S3 Encryption client does throw an error for ranges greater than EOF
- 主要言語
- Java
- スター
- 34
- フォーク
- 21
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Problem:
I created a 64KB (65536 bytes) with S3Encryption client, and then did
```
S3Client s3Client = S3Client.builder().region(Region.EU_WEST_1).build();
S3Client s3ECClient = S3EncryptionClient.builder()
.kmsKeyId("xxx")
.wrappedClient(s3Client)
.wrappedAsyncClient(S3AsyncClient.builder().region(Region.EU_WEST_1).build())
.enableLegacyUnauthenticatedModes(true)
.build();
ResponseInputStream inputStream = s3ECClient.getObject(GetObjectRequest.builder()
.bucket("xxxx")
.key("xxxx")
.range("bytes=65536-65635").build());
```
So end of range `65635` is greater than EOF at `65536`. And no error was thrown.
Creating a file with a regular S3 client and then doing
```
ResponseInputStream inputStream = s3Client.getObject(GetObjectRequest.builder()
.bucket("xxx")
.key("xxxx")
.range("bytes=65536-65635").build());
```
throws `software.amazon.awssdk.services.s3.model.S3Exception: The requested range is not satisfiable (Service: S3, Status Code: 416, Request ID:` which is what we expect to be thrown in S3A.
### Solution:
S3 Encryption client should also throw a 416 range not satisfiable error.
コントリビューションガイド
調査の方向性
64KB のオブジェクトと bytes=65536-65635 を使用して、S3EncryptionClient.getObject 経由で範囲リクエストを再現し、その後、issue に記載されている通常の S3Client の動作と比較します。暗号化クライアントが範囲レスポンスをどのように処理するかを追跡します。完了条件は、EOF を超える範囲に対して、暗号化クライアントが 416 の範囲指定不可エラーを報告することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, java
- 領域
- backend, security
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100