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 option to specify data result as sensitive #383

Open
1 task done
asheynkmantyler opened this issue Feb 5, 2024 · 0 comments
Open
1 task done

Add option to specify data result as sensitive #383

asheynkmantyler opened this issue Feb 5, 2024 · 0 comments

Comments

@asheynkmantyler
Copy link

Terraform CLI and Provider Versions

all TF versions, http provider 3.4.1

Use Cases or Problem Statement

I have a case where i would like to use http provider to get access token to the system. Basically you supply client id and client password and get token in return. i would like to be able to mark that token as sensitive to give it minimum protection.

Proposal

I propose a bool argument to the provider: response_is_sensitive. It can default to false to maintain backwards compatibility. Butif it is set, I propose two additional output parameters response_body_sensitive and response_body_base64_sensitive that would contain sensitive data. So code would look like this:

#normal nonsensitive flow
data "http" "non_sensitive" {
<nothing changes here or `response_is_sensitive` is set to false>
}

<data is stored in same variables as before>

sensitive flow:

data "http" "sensitive" {
response_is_sensitive = true
<other stuff>
}

<return data is stored in `response_body_sensitive` and `response_body_base64_sensitive` fields not normal fields

How much impact is this issue causing?

Medium

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant