Azure / Azure/AppConfiguration-JavaScriptProvider

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

Offen
#78 11 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @Eskibear Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
18
Forks
13
Ø Merge
1 T. 5 Std.
Gemergte PRs (30 T.)
4

Beschreibung

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,

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.