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

State transmitted in cleartext for azurerm backend with SAS token #23493

Closed
phekmat opened this issue Nov 25, 2019 · 4 comments · Fixed by #23496
Closed

State transmitted in cleartext for azurerm backend with SAS token #23493

phekmat opened this issue Nov 25, 2019 · 4 comments · Fixed by #23496
Labels
backend/azure bug security Auto-pinning v0.12 Issues (primarily bugs) reported against v0.12 releases
Milestone

Comments

@phekmat
Copy link
Contributor

phekmat commented Nov 25, 2019

Terraform Version

Terraform version: 0.12.16

Terraform Configuration Files

provider "azurerm" {
  version = "~> 1.36.1"
}
terraform {
  backend "azurerm" {
    storage_account_name = "<REDACTED>"
    container_name       = "tfstate"
    key                  = "terraform.tfstate"
  }
}

Expected Behavior

Terraform should transfer state over HTTPS

Actual Behavior

Terraform transmits the state over HTTP

Steps to Reproduce

  1. Create a SAS token for the storage account with either the spr set to https,http or not present
  2. Run a plan using the SAS token for authenticating

Additional Context

This was originally discovered under the azure provider as hashicorp/terraform-provider-azurerm#4912 and is related to Azure/azure-sdk-for-go#4870. Terraform is still using an older version of the SDK which doesn't have this fix. Workarounds are to set the spr to https or use an access key instead.

With the SDK fix, if spr is https,http, then HTTP is also used instead of HTTPS.

References

@pkolyvas pkolyvas added backend/azure bug v0.12 Issues (primarily bugs) reported against v0.12 releases labels Nov 25, 2019
@pkolyvas
Copy link
Contributor

Thanks for submitting this issue report. We take security concerns very seriously. This issue is in triage and we will post an update here shortly.

@pkolyvas pkolyvas self-assigned this Nov 25, 2019
@danieldreier danieldreier added the security Auto-pinning label Nov 25, 2019
@pkolyvas
Copy link
Contributor

We have reproduced this issue and are working on a fix.

@danieldreier
Copy link
Contributor

We have a fix pending in the linked PR. We're expecting to merge it and release it in v0.12.17 on Monday. @phekmat and @giggio thank you for reporting this issue!

@danieldreier danieldreier added this to the v0.12.17 milestone Nov 26, 2019
@pkolyvas pkolyvas removed their assignment Nov 29, 2019
@ghost
Copy link

ghost commented Mar 28, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend/azure bug security Auto-pinning v0.12 Issues (primarily bugs) reported against v0.12 releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants