aws-cloudformation / aws-cloudformation/cloudformation-cli
Limitations when using get_session_token
- 主要言語
- Python
- スター
- 336
- フォーク
- 172
- 平均マージ
- 3日 5分
- マージ済み PR(30日)
- 3
説明
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.
コントリビューションガイド
調査の方向性
src/rpdk/core/boto_helpers.py の get_session_token 呼び出しを確認し、その後、IAM のテスト時または実行ロールなしで STS を使用したときの失敗を再現します。完了条件は、認証情報の経路が原因でこれらのテストが失敗しなくなり、影響を受けるケースがカバレッジで網羅されていることです。この issue では、想定される置き換え後の動作は指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, python
- 領域
- authentication, cloud
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 38/100