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

Certificate private keys not hashed for aws_api_gateway_domain_name resource #6382

Closed
ghost opened this issue Nov 7, 2018 · 2 comments
Closed
Labels
service/apigateway Issues and PRs that pertain to the apigateway service.

Comments

@ghost
Copy link

ghost commented Nov 7, 2018

This issue was originally opened by @henrytk as hashicorp/terraform#9452. It was migrated here as a result of the provider split. The original body of the issue is below.


Affected Resource(s)

  • aws_api_gateway_domain_name

Expected Behavior

Based on the behaviour of the aws_iam_server_certificate resource I would expect the certificate_private_key field to be hashed before being stored in the state file.

The expected implementation would be a StateFunc, such as the pre-existing normalizeCert function which is used to hash the private key of the aws_iam_server_certificate resource.

Actual Behavior

The certificate private key is stored as plain text.

@bflad bflad added the service/apigateway Issues and PRs that pertain to the apigateway service. label Nov 12, 2018
@aeschright aeschright added the needs-triage Waiting for first response or review from a maintainer. label Jun 24, 2019
@bflad
Copy link
Contributor

bflad commented Nov 12, 2019

Hi @henrytk 👋 Thank you for submitting this.

We do not intend to add attribute value hashing to additional attributes. There are a few issues and unexpected behaviors that occur when the values are hashed in the Terraform state:

  • Any references to the attribute in other providers/resources will only contain the hashed value
  • Any update calls that require the information have no way of retrieving the actual value to successfully update
  • Hashing is not commonly applied across all sensitive values and mostly unknown as an issue until it is an issue

Some of these issues can be seen here:

The Terraform state should be wholly treated as sensitive content and protected by any means as appropriate in your organization including but not limited to whole state encryption provided by many Terraform Backends and restricting access to the state location (e.g. restrictive policies on the state storage).

Since we don't intend on changing this position with regards to hashing values at this time, we are going to close this for now. If there are other enhancements which do not have the same problematic characteristics and are scalable across Terraform resources, we would recommend submitting a new feature request or adding to the discussion on some existing feature requests surrounding state encryption such as hashicorp/terraform#9556. Thank you again for submitting this.

@bflad bflad closed this as completed Nov 12, 2019
@ghost
Copy link
Author

ghost commented Dec 13, 2019

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 Dec 13, 2019
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/apigateway Issues and PRs that pertain to the apigateway service.
Projects
None yet
Development

No branches or pull requests

3 participants