Made sure configTokenProvider default bean will be overridden by more specific versions (e.g. vault configTokenProvider, etc.)
Fixes gh-1485
Fixes gh-1537
without this change when adding the vault token `spring.cloud.config.server.vault.token` we have 2 config token providers on the classpath, the `VaultConfiguration#configTokenProvider` and the `EnvironmentRepositoryConfiguration$DefaultConfigTokenProvider` both with the same bean name. Starting from Boot 2.2 (AFAIR) that's unacceptable by default.
with this change we're changing the bean name so that we don't override the other bean name.
CipherEnvironmentEncryptor.decrypt() gets a TextEncryptor for each
environment property by KeyStoreTextEncryptorLocator.locate() which
calls KeyStoreKeyFactory.getKeyPair() to create an instance of
RsaSecretEncrptor.
Unfortunately KeyStoreKeyFactory.getKeyPair() seems extremely slow for
jks files whose format is PKCS12. So we need not to repeat calling the
method if possible.
Reuse an intance of RsaSecretEncrptor to avoid the performance problem.
Always including application as default so that it can be shared accross all applications to be consistent with other repository implementations.
Sharing secrets to the application from default profile.
Updated the docs to reflect the changes
* Use a more robust filter when dealing with multiple keys. Fixes#1533
* Simplifying tests
* Creating a variable for the Pattern to avoid creating it everytime
Migrates the Spring Cloud Config Server support for Vault from using a RestTemplate directly to using Spring Vault and VaultTemplate. These changes should provide exactly the same features with backward-compatible properties-based auto-configuration and Java configuration, while allowing for more features in the future via Spring Vault's extensive support for Vault integration.
The old RestTemplate implementation remains as deprecated. The implementation is chosen based on the existence of VaultTemplate.
Fixes gh-1474
* Clean up AWS s3 EnvironmentRepository
* Don't require a profile prefix for the default profile - either 'application.[properties|yml|json]' or 'application-default.[properties|yml|json]' will match.
* Support a comma-delimited list of profiles and load each specified profile.
* Add Resource API support to the AwsS3EnvironmentRepository.
Fixes#1506
Does this by adding produces application/json on backwards compatible
controller methods. Otherwise, old clients would get the new format.
fixes gh-1520