-
Notifications
You must be signed in to change notification settings - Fork 444
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
local.settings.json in .gitignore #925
Comments
Would love to hear @ahmelsayed's thoughts on this. |
Thanks for the feedback. I think the potential sensitivity of application settings is a general theme in software development and not one that needs special consideration here. To give the simplest example I can to illustrate my point: A new developer joins our team and she clones and builds one of our function project repos but she can't run the function because she's missing the local settings. This doesn't feel right. |
While this is inconvenient, it's the "right" work flow. You shouldn't be committing secrets (passwords, connection strings, certs, API keys, etc) in your source control. This presents the problem of how to run the project when you clone the repo. The current solution is to have some other mechanism you trust of sharing these secrets between machines. I realize this is handwavy and doesn't present a concrete solution, but it's the current state. One option is to have all the settings defined on a function app in azure, then have the new developer run We're working on adding support for reading those settings from KeyVault. Once that's in, we can allow the keyvault instance name to be defined in your host.json and then the runtime will be able to fetch all the settings from there directly. That way you can just share a keyvault with Azure IAM access across your team and manage these secrets securely. I opened #933 to track making the integration better from the core-tools once the runtime has the feature. |
@shladdergoo - I've recently set up a functions v2 project with the expectation of checking it in with non-secure settings, and having user secrets be our way of specifying secure settings locally while able to share others in git. User secrets don't appear to be supported implicitly via the functions framework, but it's possible to add them to the provided IConfiguration by following the process described in this blog post: http://marcelegger.net/azure-functions-v2-keyvault-and-iconfiguration |
I also disagree with this behavior. Having Once you introduce secrets to the file, that is on you. It's a poor developer experience to have to reproduce a config file (that can be large) or pull it from somewhere else. One should be able to clone + run assuming they have all external dependencies (storage emulator, sql server, etc). |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What is the thinking behind local.settings.json being added to .gitignore for new function projects by default? I realize that this file should not be published to Azure (or will be ignored if it is) but unless it is added to git we lose local application settings between team members as we collaborate on functions.
Can a suggest it is no longer ignored?
The text was updated successfully, but these errors were encountered: