azurerm_static_webapp - Mark app_settings sensitive in schema#28689
Conversation
…mends storing client secrets in them.
|
Isn't the fix here to store the secret in a keyvault, then reference the keyvault from the app settings? See https://learn.microsoft.com/en-us/azure/static-web-apps/key-vault-secrets |
Keyvault integration is certainly one answer but I do not believe it can/should be the only answer for a few reasons eg:
In the current state of the provider, the only option to hide these secrets is to use a key vault integration. This forces developers down a single path, when there are multiple available. The provider should be unopinionated on something that comes down to a choice by the developer. In the current state, if a developer wants to treat app_settings as sensitive they have no ability to do so as their resource cannot override the provider output. On the flip side if this change is made and a developer wants to see the values of app_settings when it is marked as sensitive they have that option available to them. |
azurerm_static_webapp - Mark app_settings sensitive in schema
jackofallops
left a comment
There was a problem hiding this comment.
Thanks @arnoldrw - LGTM 👍
* new changelog for 4.26.0 * Update CHANGELOG.md #29212 * Update CHANGELOG.md #28786 * Update CHANGELOG.md for #29095 * Update CHANGELOG.md #29225 * Update CHANGELOG.md #29168 * Update CHANGELOG.md #28890 * Update CHANGELOG.md for #28689 * Update CHANGELOG.md #28354 * Update CHANGELOG.md #29240 * Update CHANGELOG.md for #29211 * Update CHANGELOG.md #29214 * Update CHANGELOG.md for #29209 * Update CHANGELOG.md for 28690 * Update CHANGELOG.md for #28577 * Update for #29217 #29144 #29145 * Update CHANGELOG.md for #29185 * prep for release --------- Co-authored-by: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Co-authored-by: catriona-m <86247157+catriona-m@users.noreply.github.com> Co-authored-by: Wyatt Fry <wyattfry@gmail.com> Co-authored-by: Matthew Frahry <mbfrahry@gmail.com> Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com> Co-authored-by: stephybun <steph@hashicorp.com>
|
@arnoldrw you mentioned
How would I exactly do that? When I just set instead of previously (up to version 4.25) |
|
@jackofallops I think you need to seriously consider reverting this PR and @arnoldrw I think you made the changes on the wrong resource. The title of the PR indicates that these changes were meant for the azurerm_static_webapp resource. However, upon further investigation, the changes appear to have been made to the azurerm_windows_function_app resource. What was actually intended here? I believe this change is hiding all of our app_settings on windows function apps. With all the options available with Key Vault and App Config Service there is no reason to ever store sensitive values in the app_settings for a windows function app. |
…mends storing client secrets in them. (hashicorp#28689)
* new changelog for 4.26.0 * Update CHANGELOG.md hashicorp#29212 * Update CHANGELOG.md hashicorp#28786 * Update CHANGELOG.md for hashicorp#29095 * Update CHANGELOG.md hashicorp#29225 * Update CHANGELOG.md hashicorp#29168 * Update CHANGELOG.md hashicorp#28890 * Update CHANGELOG.md for hashicorp#28689 * Update CHANGELOG.md hashicorp#28354 * Update CHANGELOG.md hashicorp#29240 * Update CHANGELOG.md for hashicorp#29211 * Update CHANGELOG.md hashicorp#29214 * Update CHANGELOG.md for hashicorp#29209 * Update CHANGELOG.md for 28690 * Update CHANGELOG.md for hashicorp#28577 * Update for hashicorp#29217 hashicorp#29144 hashicorp#29145 * Update CHANGELOG.md for hashicorp#29185 * prep for release --------- Co-authored-by: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Co-authored-by: catriona-m <86247157+catriona-m@users.noreply.github.com> Co-authored-by: Wyatt Fry <wyattfry@gmail.com> Co-authored-by: Matthew Frahry <mbfrahry@gmail.com> Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com> Co-authored-by: stephybun <steph@hashicorp.com>
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Community Note
Description
This pr updates app_settings in static_webapp_resource to be a sensitive field.
Official Microsoft setup documentation related to setting up authentication for a static webapp indicate that setting an EntraID app registration client secret as an app setting is an expected configuration. Currently with app_settings not marked as a sensitive field, this results in the actual secret value being displayed.
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
static_webapp_resource- Make app_settings sensitiveThis is a (please select all that apply):
Related Issue(s)
Note
If this PR changes meaningfully during the course of review please update the title and description as required.