How can I use Secret Manager in Azure Function?
Hi
Could you provide an example of how I can use Secret Manager in Azure Function on local development environment?
Thanks
Fabian
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 9c99993c-c983-6fda-6c3a-ce4ec8c1d5db
- Version Independent ID: ba688ac2-e90e-fce5-f60d-40c2553c3efd
- Content: Safe storage of app secrets in development in ASP.NET Core
- Content Source: aspnetcore/security/app-secrets.md
- Product: aspnet-core
- Technology: aspnetcore-security
- GitHub Login: @Rick-Anderson
- Microsoft Alias: scaddie
Per the doc: This document explains techniques for storing and retrieving sensitive data during development of an ASP.NET Core app on a development machine.
I would like to see this as well. Perhaps there's an equivalent Function doc that can be linked to.
This article is highly lacking when it comes to Azure Functions. First of all, it is not clear what schema should be used in secrets.json file. For Azure Functions, local.settings.json (not appsettings.json!) has all the settings under Values section. Should secrets.json use Values section as well? The second issue, how to load user secrets at runtime? It is not obvious how to call AddUserSecrets functions. Besides, Azure Functions v.3 should load all standard locations by default. Still, no matter how I tried, I was unable to retrieve any setting from secrets.json.
First sentence of article:
This document explains techniques for storing and retrieving sensitive data during development of an ASP.NET Core app on a development machine.