aws / aws/amazon-s3-encryption-client-java
S3EncryptionClient builder requires region input even when endpointOverride is provided
- Ngôn ngữ chính
- Java
- Star
- 34
- Fork
- 21
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### Problem:
`S3EncryptionClient.builder()` requires `region` as a mandatory input, even when `endpointOverride` is provided. This is a difference in behaviour from earlier version, where it was allowed to create the builder with only `endpointConfiguration` and without `region`.
Due to this, we have to pass a default region value always, resulting in ResourceNotFoundException for S3 Compatible vendors using a bucket in a different region. If no region is provided, and only endpoint is given, it works fine when using `com.amazonaws.aws`.
### Solution:
Allow `region` to be empty when `endpointOverride` is defined.
### Additional information
We are using these SDKs in Scala code
Java Version: Azul Zulu: 11.80.21
Scala Version: 2.12.19
## SDK versions
com.amazonaws.aws: 1.12.768
amazon-s3-encryption-client-java: 3.3.5
software.amazon.awssdk.s3: 2.31.67
### Sample Code
```
Using com.amazonaws.aws
AmazonS3EncryptionClientV2Builder
.standard()
.withEndpointConfiguration(
new EndpointConfiguration(endpoint, region)
)
Using software.amazon.awssdk.s3
S3EncryptionClient
.builder()
.endpointOverride(s3UriEndpoint)
.region(Region.of(s3Region)) --> Fails without passing this
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu từ S3EncryptionClient.builder() và theo dõi cách endpointOverride và việc xác thực region được xử lý. So sánh hành vi hiện tại với ví dụ endpointConfiguration cũ hơn; hoàn thành nghĩa là một builder chỉ có endpoint được chấp nhận mà không yêu cầu region, và người dùng S3 tương thích không còn phải cung cấp một region mặc định có thể không chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- aws, java
- Lĩnh vực
- cloud, security
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 48/100