Use jks as the default KeyStore type (#1258)
* Always use jks as the KeyStore type instead of trying to extract it from the resource extension. Fixes #1176 * Use property to decide the type of KeyStore to create
This commit is contained in:
@@ -983,6 +983,7 @@ keystore properties are `encrypt.keyStore.\*` with `*` equal to
|
||||
|`encrypt.keyStore.location`|Contains a `Resource` location
|
||||
|`encrypt.keyStore.password`|Holds the password that unlocks the keystore
|
||||
|`encrypt.keyStore.alias`|Identifies which key in the store to use
|
||||
|`encrypt.keyStore.type`|The type of KeyStore to create. Defaults to `jks`.
|
||||
|===
|
||||
|
||||
The encryption is done with the public key, and a private key is
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -11,7 +11,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-build</artifactId>
|
||||
<version>2.0.5.BUILD-SNAPSHOT</version>
|
||||
<version>2.0.6.BUILD-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<scm>
|
||||
@@ -22,7 +22,7 @@
|
||||
</scm>
|
||||
<properties>
|
||||
<bintray.package>config</bintray.package>
|
||||
<spring-cloud-commons.version>2.0.3.BUILD-SNAPSHOT</spring-cloud-commons.version>
|
||||
<spring-cloud-commons.version>2.0.4.BUILD-SNAPSHOT</spring-cloud-commons.version>
|
||||
</properties>
|
||||
<modules>
|
||||
<module>spring-cloud-config-dependencies</module>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>2.0.5.BUILD-SNAPSHOT</version>
|
||||
<version>2.0.6.BUILD-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-config-dependencies</artifactId>
|
||||
|
||||
@@ -97,7 +97,7 @@ public class EncryptionAutoConfiguration {
|
||||
KeyStore keyStore = this.key.getKeyStore();
|
||||
KeyStoreTextEncryptorLocator locator = new KeyStoreTextEncryptorLocator(
|
||||
new KeyStoreKeyFactory(keyStore.getLocation(),
|
||||
keyStore.getPassword().toCharArray()),
|
||||
keyStore.getPassword().toCharArray(), key.getKeyStore().getType()),
|
||||
keyStore.getSecret(), keyStore.getAlias());
|
||||
RsaAlgorithm algorithm = this.rsaProperties.getAlgorithm();
|
||||
locator.setRsaAlgorithm(algorithm);
|
||||
|
||||
Reference in New Issue
Block a user