-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement CDK AccessKey (construct) #8432
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
help wanted
We are asking the community to submit a PR to resolve this issue.
p2
Comments
mergify bot
pushed a commit
that referenced
this issue
Jan 11, 2022
This adds an L2 resource for creating IAM access keys. Instructions for creating access keys are added to the README near the information on creating users. Tests are added (including an integration test) and locations elsewhere in the CDK where `CfnAccessKey` was used have been updated to leverage the new L2 construct (which required changes in the `secretsmanager` and `apigatewayv2-authorizers` packages). Excludes were added for two `awslint` rules. Access Keys don't support specifying physical names, so having such a property is impossible. Additionally, since the primary value of an `AWS::IAM::AccessKey` is to gain access to the `SecretAccessKey` value, a `fromXXX` static method doesn't seem to make a lot of sense (because ideally you'd just pull that from a Secret anyway if it was required in the app). I looked into integrating with `secretsmanager.Secret` as part of this PR; however, at this time it's currently experimental to support strings via tokens and the experimental resource's documentation isn't available so it seemed suboptimal to do that integration. Resolves: #8432 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
TikiTDO
pushed a commit
to TikiTDO/aws-cdk
that referenced
this issue
Feb 21, 2022
This adds an L2 resource for creating IAM access keys. Instructions for creating access keys are added to the README near the information on creating users. Tests are added (including an integration test) and locations elsewhere in the CDK where `CfnAccessKey` was used have been updated to leverage the new L2 construct (which required changes in the `secretsmanager` and `apigatewayv2-authorizers` packages). Excludes were added for two `awslint` rules. Access Keys don't support specifying physical names, so having such a property is impossible. Additionally, since the primary value of an `AWS::IAM::AccessKey` is to gain access to the `SecretAccessKey` value, a `fromXXX` static method doesn't seem to make a lot of sense (because ideally you'd just pull that from a Secret anyway if it was required in the app). I looked into integrating with `secretsmanager.Secret` as part of this PR; however, at this time it's currently experimental to support strings via tokens and the experimental resource's documentation isn't available so it seemed suboptimal to do that integration. Resolves: aws#8432 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
help wanted
We are asking the community to submit a PR to resolve this issue.
p2
Use Case
Create an AccessKey (and SecretKey) via CDK Construct.
Proposed Solution
Actually, the only way is to use Cfn via : class CfnAccessKey (construct)
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iam.CfnAccessKey.html
Other
Needed for example, to create a dedicated SMTP User.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: