RavinderReddyF5 / terraform-provider-bigip-version0.12

Terraform resources that can configure F5 BIGIP products
Mozilla Public License 2.0
0 stars 0 forks source link

[CLOSED] Provider shows passwords in clear text when issuing terraform plan. #310

Open RavinderReddyF5 opened 3 years ago

RavinderReddyF5 commented 3 years ago

Issue by soumik612 Wednesday Apr 29, 2020 at 09:02 GMT Originally opened as https://github.com/terraform-providers/terraform-provider-bigip/issues/279


While testing the client_ssl profile and postgre_sql monitor, I came across an issue where in the ssl key and the postgresql passwords are displayed in clear text.

E.g. This is how my PostGRESQL monitor looks like: image

Once the resource has been applied on the F5, the associated state looks like this. (Password is hashed)

image

Consequently, even if there are no changes to the resource, when I issue Terraform plan, I get this message

image

EXPECTED SCENARIO: Since the resoure is not been modified, the provider should not show it in the plan. Also the provider compares the passphrase in the state file ,matches it with resource config and concludes that the passphrase needs to be updated, which should not be the case.

RavinderReddyF5 commented 3 years ago

Comment by papineni87 Wednesday Apr 29, 2020 at 16:41 GMT


we can add sensitive tag to password attribute, so that it won't show it as clear text, but i am not sure about the diff in password even though there is no change in it

RavinderReddyF5 commented 3 years ago

Comment by papineni87 Friday May 29, 2020 at 09:57 GMT


@soumik612

It looks like normal get call on bigip monitor itself gives encrypted password, so to avoid any state diff to password variable we can add password to ignore_changes block.

resource "bigip_ltm_monitor" "test_postgres" { name = "/Common/test_postgres" parent = "/Common/postgresql" username = "sql-tester" password = "abcd123" database = "postgre"

lifecycle { ignore_changes = [ password ] } }

RavinderReddyF5 commented 3 years ago

Comment by papineni87 Sunday Jun 14, 2020 at 16:27 GMT


Fixed in v1.2.1, if issue seems to persist, please reopen the bug