oracle / ojdbc-extensions

The Oracle JDBC Driver Extensions include providers for centralized configuration or token providers for authentication with the DB.
Universal Permissive License v1.0
13 stars 5 forks source link

add Azure Vault Provider #57

Closed norah-li closed 7 months ago

norah-li commented 8 months ago

First upload of Azure Vault Provider.

A new utility class AzureVaultURLParser is added and I move the variable PARAMETER_SET_PARSER and method parseVaultSecretUri from AzureVaultSecretProvider to this new class. The reason is that I think I can reuse the code to parse secret URL not only in AzureVaultSecretProvider, but also in the new AzureVaultJsonProvider.

The getJson in AzureVaultJsonProvider takes in String secretIdentifier and return the payload stored in secret value.

The size limit of a secret in azure vault is 25 KB. According to Azure docs - About Azure Key Vault secrets "Internally, Key Vault stores and manages secrets as sequences of octets (8-bit bytes), with a maximum size of 25k bytes each."

Similar to prefix in OCI Vault case, The prefix is now config-vaultazure. The regular expression in driver code is @config-(\\w*):(.*). If we want hyphen in between, which is config-vault-azure The regular expression can be changed to @config-(\\w+(-\\w+)*|):(.*).

Please take a look.