Azure / Azure/AppConfiguration-JavaScriptProvider

"application/json" content type is not handled in KeyVault references

Open
#78 11 comments 0 reactions 1 assignee Claimed by @Eskibear View on GitHub
enhancement
Dominant language
TypeScript
Stars
18
Forks
13
Avg merge
1d 5h
Merged PRs (30d)
4

Description

Internally AzureKeyVaultKeyValueAdapter doesn't handle ContentType property of secret value and returns naked value.

So we have dual behavior when same JSON setting stored directly or using keyvault reference with application/json content type returned as object or string.

I think problem seats at this peace of AzureKeyVaultKeyValueAdapter code
` if (client) {
// TODO: what if error occurs when reading a key vault value? Now it breaks the whole load.
const secret = await client.getSecret(secretName, { version });
return [setting.key, secret.value]; // here it returns raw value without considering secret.properties.contentType value
}
`

Thank you,

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.