In an attempt to not expose my keystore creds (in plaintext) I have a bean definition
@Bean
public KeyProperties keyProperties() throws MalformedURLException {
//snipped
return keyProperties;
}
which works as far as my keystore creds are concerned. The encrypt endpoint works and if i have cipher props in my property files in git it decrypts it properly.
Unfortunately when I set properties for git spring.cloud.config.server.git.password={cipher}snipped it throws an exception
Caused by: java.lang.UnsupportedOperationException: No decryption for FailsafeTextEncryptor. Did you configure the keystore correctly? at org.springframework.cloud.bootstrap.TextEncryptorConfigBootstrapper$FailsafeTextEncryptor.decrypt(TextEncryptorConfigBootstrapper.java:162) which I'm guessing is because of the keystore bean not being initialized at that point in time
Does anyone know how I can configure a bean for the git endpoint ?
@Bean
public CredentialsProvider getCredentialsProvider() {
GitCredentialsProviderFactory gcp = new GitCredentialsProviderFactory();
CredentialsProvider cp = gcp.createFor("url","username","password",null,false);
return cp;
}
does not seem to work.
Thanks