aws-cloudformation / aws-cloudformation/cloudformation-cli
Limitations when using get_session_token
- Ngôn ngữ chính
- Python
- Star
- 336
- Fork
- 172
- Merge trung bình
- 3 ngày 5 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
Currently when doing a test the code will use `get_session_token` when an execution role isn't provided or the credential chain being used doesn't have a session token.
https://github.com/aws-cloudformation/cloudformation-cli/blob/1d32b070d26cf6c8d17b03dc06190c08d5c9444b/src/rpdk/core/boto_helpers.py#L67
The [get_session_token](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sts.html#STS.Client.get_session_token) will return back credentials that have a few exceptions.
```
You cannot call any IAM API operations unless MFA authentication information is included in the request.
You cannot call any STS API except AssumeRole or GetCallerIdentity .
```
The result is if you are testing an IAM resource or using STS in your resource the tests will fail.
The workaround is to use an execution role.
Hướng dẫn đóng góp
Hướng nghiên cứu
Đọc src/rpdk/core/boto_helpers.py tại lệnh gọi get_session_token, sau đó tái hiện lỗi khi kiểm thử IAM hoặc sử dụng STS mà không có execution role. Hoàn tất nghĩa là đường dẫn thông tin xác thực không còn khiến các bài kiểm thử đó thất bại, đồng thời các trường hợp bị ảnh hưởng có coverage; issue không nêu rõ hành vi thay thế dự kiến.
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, python
- Lĩnh vực
- authentication, cloud
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- 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
- 38/100