Azure / Azure/azure-functions-host
Improve error messages returned when using Key Vault integration
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
#### What problem would the feature you're requesting solve? Please describe.
When user's provide this app setting: `AzureWebJobsSecretStorageKeyVaultUri`, without a system-assigned identity existing for the app - the error message is generic: `Failed to create mykey: error creating or updating function key`
This also happens when using `AzureWebJobsSecretStorageKeyVaultName` and `AzureWebJobsSecretStorageKeyVaultClientId`, without the corresponding identity being assigned to the app.
#### Describe the solution you'd like
Clear error messaging letting users know the reason behind the error. For example, in the scenarios described above, this is because they need to assign their identity to the function app.
Similarly, the error message for forbidden operations could also me improved. `Failed to create mykey: Encountered an error (Forbidden) from extensions API` < - here `from extensions API` doesn't help give context. This error is actually a forbidden error from the Key Vault.
#### Additional context
Discussed in #7055
Contributor guide
Research direction
Start by tracing the Azure Key Vault integration error paths in the azure-functions-host repository and review the related discussion in issue #7055. Verify that missing identity and forbidden Key Vault cases produce messages that explain the actual cause and required context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- authentication, cloud, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100