aws / aws/aws-encryption-sdk-java

Allow to pass overrideConfiguration per request

Đang mở
#2,107 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Java
Star
240
Fork
125
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Security issue notifications

If you discover a potential security issue in the AWS Encryption SDK we ask that you notify AWS Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue.

### Problem:

If i want to pass additional headers with Decrypt call (e.g Confused Deputy protection). I need to provide for each account own KmsClient. Instead in SdkV2 i can call .overrideConfiguration on request (you already use it for API_NAMESPACE).

If it will be possible to add .overrideConfiguration per call encrypt/decrypt i can use the same KmsClient for all accounts.

### Solution:

A description of the possible solution in terms of Encryption SDK architecture.

I see 2 options:
1. in AwsCrypto.decryptData/ecryptData provide additional argument with options
2. When construct KmsMasterKeyProvider ask for supplier for override. But there we need to send something in addition to identify context of request

### Out of scope:

Is there anything the solution will intentionally NOT address?

[//]: # (NOTE: If you believe this might be a security issue, please email aws-security@amazon.com instead of creating a GitHub issue. For more details, see the AWS Vulnerability Reporting Guide: https://aws.amazon.com/security/vulnerability-reporting/ )

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách lần theo AwsCrypto.decryptData/encryptData và KmsMasterKeyProvider để hiểu overrideConfiguration theo từng request của AWS SDK v2 có thể được đưa vào ở đâu. So sánh cách sử dụng API_NAMESPACE hiện có với hai tùy chọn được đề xuất, sau đó xác định context của request và dạng API cần thiết cho encrypt và decrypt. Hoàn thành có nghĩa là một KmsClient có thể phục vụ các request cho nhiều tài khoản và các header bổ sung được truyền đến lệnh gọi KMS.

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
backend-api-design, security
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.