Skip to content
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

Add SigV4 for SES SMTP passwords #11143

Closed
n3ph opened this issue Dec 4, 2019 · 4 comments · Fixed by #11144
Closed

Add SigV4 for SES SMTP passwords #11143

n3ph opened this issue Dec 4, 2019 · 4 comments · Fixed by #11144
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/iam Issues and PRs that pertain to the iam service.
Milestone

Comments

@n3ph
Copy link
Contributor

n3ph commented Dec 4, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

As SigV2 is deprecated and replaced by SigV4 the used signature algorithm should be updated. Since the new algorithm intends to sign a password for a specific AWS region it should be possible to get signed SES SMTP passwords per defined region.

affected Resource

  • aws_iam_access_key

Potential Terraform Configuration

resource "aws_iam_user" "test" {
  name = "test"
  path = "/test/"
}

resource "aws_iam_access_key" "test" {
  user             = aws_iam_user.test.name
  ses_smtp_regions = ["eu-central-1", "us-east-1"]
}

output "aws_iam_smtp_password_eu_central_1" {
  value = [for ses_smtp_password in aws_iam_access_key.test.ses_smtp_passwords :
  ses_smtp_password.secret if ses_smtp_password.region == "eu-central-1"][0]
}

References

@n3ph n3ph added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 4, 2019
@ghost ghost added the service/iam Issues and PRs that pertain to the iam service. label Dec 4, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 4, 2019
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Feb 20, 2020
@n3ph
Copy link
Contributor Author

n3ph commented Feb 20, 2020

As suggested in #11144 (review) the solution was simplified to use the current provider region as a parameter for the SigV4 algorithm.
Code base is heavily simplified and users aren't going to be confused by the multiple region capability of that resource.

Potential Terraform Configuration

resource "aws_iam_user" "test" {
  name = "test"
  path = "/test/"
}

resource "aws_iam_access_key" "test" {
  user = aws_iam_user.test.name
}

output "aws_iam_smtp_password_v4" {
  value = aws_iam_access_key.test.ses_smtp_password_v4
}

@bflad bflad added this to the v2.50.0 milestone Feb 20, 2020
@bflad
Copy link
Contributor

bflad commented Feb 20, 2020

Support for generating SES SMTP v4 passwords into a new ses_smtp_password_v4 attribute has been merged and will release with version 2.50.0 of the Terraform AWS Provider. Thanks to @n3ph for the implementation. 👍

Please note: The password value is region-specific to the provider region of the aws_iam_access_key resource. To work across multiple regions, separate resources are necessary.

@ghost
Copy link

ghost commented Feb 21, 2020

This has been released in version 2.50.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Mar 22, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/iam Issues and PRs that pertain to the iam service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants