Skip to content

Commit 22954e6

Browse files
author
Moary Chen
authored
Fix keyvault starter readme (Azure#23900)
Fix Spring Key Vault starter readme
1 parent 3bfb548 commit 22954e6

File tree

1 file changed

+23
-22
lines changed
  • sdk/spring/azure-spring-boot-starter-keyvault-secrets

1 file changed

+23
-22
lines changed

sdk/spring/azure-spring-boot-starter-keyvault-secrets/README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,20 @@ From a developer's perspective, Key Vault APIs accept and return secret values a
2525

2626
For highly sensitive data, clients should consider additional layers of protection for data. Encrypting data using a separate protection key prior to storage in Key Vault is one example.
2727

28-
Key Vault also supports a contentType field for secrets. Clients may specify the content type of a secret to assist in interpreting the secret data when it's retrieved. The maximum length of this field is 255 characters. There are no pre-defined values. The suggested usage is as a hint for interpreting the secret data.
28+
Key Vault also supports a contentType field for secrets. Clients may specify the content type of secret to assist in interpreting the secret data when it's retrieved. The maximum length of this field is 255 characters. There are no pre-defined values. The suggested usage is as a hint for interpreting the secret data.
29+
30+
Besides, this starter supports multiple Key Vaults(in theory, it can support an unlimited number), case-sensitive mode of Key Vault names, and using placeholder presenting Key Vault names in the property file.
2931

30-
Besides, this starter provides features of supporting multiple Key Vaults, case sensitive mode of Key Vault names and using placeholder presenting Key Vault names in property file
3132
### Multiple Key Vault support
3233

33-
If you want to use multiple Key Vaults you need to define names for each of the
34+
If you want to use multiple Key Vaults, you need to define names for each of the
3435
Key Vaults you want to use and in which order the Key Vaults should be consulted.
35-
If a property exists in multiple Key Vaults the order determine which value you
36+
If a property exists in multiple Key Vaults, the order determines which value you
3637
will get back.
3738

38-
### Case sensitive key mode
39+
### Case-sensitive key mode
3940

40-
The new case sensitive mode allows you to use case sensitive Key Vault names. Note
41+
The new case-sensitive mode allows you to use case-sensitive Key Vault names. Note
4142
that the Key Vault secret key still needs to honor the naming limitation as
4243
described in the “keyvault-name” element of [About keys, secrets, and certificates](https://docs.microsoft.com/azure/key-vault/general/about-keys-secrets-certificates).
4344

@@ -48,17 +49,17 @@ in the Spring Boot documentation.
4849

4950
## Examples
5051
### Custom settings
51-
To use the custom configuration, open `application.properties` file and add below properties to specify your Azure Key Vault url, Azure service principal client id and client key.
52-
- `azure.keyvault.enabled` is used to turn on/off Azure Key Vault Secret property source, default is true.
53-
- `azure.keyvault.token-acquiring-timeout-seconds` is used to specify the timeout in seconds when acquiring token from Azure AAD. Default value is 60 seconds. This property is optional.
54-
- `azure.keyvault.refresh-interval` is the period for PropertySource to refresh secret keys, its value is 1800000(ms) by default. This property is optional.
55-
- `azure.keyvault.secret-keys` is a property to indicate that if application using specific secret keys, if this property is set, application will only load the keys in the property and won't load all the keys from keyvault, that means if you want to update your secrets, you need to restart the application rather than only add secrets in the keyvault.
52+
To use the custom configuration, open the `application.properties` file and add below properties to specify your Azure Key Vault URI, Azure service principal client id, and client key.
53+
- `azure.keyvault.enabled` is used to turn on/off Azure Key Vault Secret as a Spring Boot property source, the default value is true.
54+
- `azure.keyvault.token-acquiring-timeout-seconds` is optional. Its value is used to specify the timeout in seconds when acquiring a token from Azure AAD, the default value is 60 seconds.
55+
- `azure.keyvault.refresh-interval` is optional. Its value is used to specify the period for PropertySource to refresh secret keys, the default value is 1800000(ms).
56+
- `azure.keyvault.secret-keys` is used to indicate that if an application using specific secret keys and this property is set, the application will only load the keys in the property and won't load all the keys from Key Vault, that means if you want to update your secrets, you need to restart the application rather than only add secrets in the Key Vault.
5657
- `azure.keyvault.authority-host` is the URL at which your identity provider can be reached.
5758
- If working with azure global, just left the property blank, and the value will be filled with the default value.
58-
- If working with azure stack, set the property with authority URL.
59+
- If working with azure stack, set the property with authority URI.
5960
- `azure.keyvault.secret-service-version`
60-
- The valid secret-service-version value can be found [here][version_link].
61-
- This property is optional, if property not set, the property will be filled with the latest value.
61+
- The valid values for this property can be found [here][version_link].
62+
- This property is optional. If not set, the property will be filled with the latest value.
6263

6364
```
6465
azure.keyvault.enabled=true
@@ -101,7 +102,7 @@ azure.keyvault.uri=put-your-azure-keyvault-uri-here
101102
azure.keyvault.client-id=put-your-azure-client-id-here
102103
```
103104

104-
If you are using system assigned identity you don't need to specify the client-id.
105+
If you are using system assigned identity, you don't need to specify the client-id.
105106

106107
### Save secrets in Azure Key Vault
107108
Save secrets in Azure Key Vault through [Azure Portal](https://blogs.technet.microsoft.com/kv/2016/09/12/manage-your-key-vaults-from-new-azure-portal/) or [Azure CLI](https://docs.microsoft.com/cli/azure/keyvault/secret).
@@ -139,7 +140,7 @@ public class KeyVaultSample implements CommandLineRunner {
139140
```
140141

141142
### Multiple Key Vault support
142-
The example below shows a setup for 2 key vaults, named `keyvault1` and
143+
The example below shows a setup for 2 Key Vaults, named `keyvault1` and
143144
`keyvault2`. The order specifies that `keyvault1` will be consulted first.
144145

145146
```
@@ -153,13 +154,13 @@ azure.keyvault.keyvault2.client-id=put-a-azure-client-id-here
153154
azure.keyvault.keyvault2.client-key=put-a-azure-client-key-here
154155
azure.keyvault.keyvault2.tenant-id=put-a-azure-tenant-id-here
155156
```
156-
Note if you decide to use multiple key vault support and you already have an
157+
Note if you decide to use multiple Key Vault support, and you already have an
157158
existing configuration, please make sure you migrate that configuration to the
158-
multiple key vault variant. Mixing multiple key vaults with an existing single
159-
key vault configuration is a non supported scenario.
159+
multiple Key Vault variant. Mixing multiple Key Vaults with an existing single
160+
Key Vault configuration is a non-supported scenario.
160161

161-
### Case sensitive key mode
162-
To enable case sensitive mode, you can set the following property in the `appliation.properties`:
162+
### Case-sensitive key mode
163+
To enable case-sensitive mode, you can set the following property in the `appliation.properties`:
163164
```
164165
azure.keyvault.case-sensitive-keys=true
165166
```
@@ -169,7 +170,7 @@ my.not.compliant.property=${myCompliantKeyVaultSecret}
169170
```
170171

171172
The application will take care of getting the value that is backed by the
172-
`myCompliantKeyVaultSecret` key name and assign its value to the non compliant
173+
`myCompliantKeyVaultSecret` key name and assign its value to the non-compliant
173174
`my.not.compliant.property`.
174175

175176
## Troubleshooting

0 commit comments

Comments
 (0)