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

data-source/tls_certificate: Consider Disabling HTTP Redirects (Or Provide Configuration Choice) #250

Open
1 task done
bflad opened this issue Jul 26, 2022 · 0 comments

Comments

@bflad
Copy link
Contributor

bflad commented Jul 26, 2022

Terraform CLI and Provider Versions

Terraform v1.2.5
TLS Provider 4.0.1

Use Cases or Problem Statement

Version 4.0.0 and later of the TLS provider currently implement a HTTP client for handling HTTPS schemed URLs. The default behavior of that HTTP client is to follow up to 10 HTTP redirects. TLS certificates may differ between the originally requested URL and the redirected URL.

Proposal

For the purposes of this particular data source, it feels more appropriate to return the TLS certificates of the originally requested URL, since that is what is explicitly configured. Outside of this data source, any HTTP requests to the original URL would be initially presented with the original URL certificates first, given the HTTP redirects happen as a response to the initial request. This also preserves the 3.x and prior behavior when it used direct TLS connections to the given URL and had no knowledge of HTTP client semantics.

There could also be consideration for having a separate "follow HTTP redirects" configurable attribute to handle the other use case, if there is a valid use for that.

How much impact is this issue causing?

Medium

Additional Information

References:

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