java.lang.IllegalArgumentException: Resource class path resource [etc/cf-instance-credentials/instance.crt] does not exist
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.util.Assert.isTrue(Assert.java:136)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.vault.authentication.ResourceCredentialSupplier.(ResourceCredentialSupplier.java:71)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.vault.config.ClientAuthenticationFactory.pcfAuthentication(ClientAuthenticationFactory.java:440)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.vault.config.ClientAuthenticationFactory.createClientAuthentication(ClientAuthenticationFactory.java:140)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.vault.config.VaultBootstrapConfiguration.clientAuthentication(VaultBootstrapConfiguration.java:248)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at java.lang.reflect.Method.invoke(Method.java:498)
using Pivotal CloudFoundry authentication with vault getting below error.
Note: I have ssh to other working container and verified could able to see the certification and key in the specified path.
Observation, For time being added the certificates to the class path under resources , I’m getting connected to the vault.
vault: host: ** port: 443 scheme: https connection-timeout: 5000 read-timeout: 15000 authentication: PCF
pcf: role: poc pcf-path: pcf instance-certificate: /etc/cf-instance-credentials/instance.crt instance-key: /etc/cf-instance-credentials/instance.key
java.lang.IllegalArgumentException: Resource class path resource [etc/cf-instance-credentials/instance.crt] does not exist 2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.util.Assert.isTrue(Assert.java:136) 2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.vault.authentication.ResourceCredentialSupplier.(ResourceCredentialSupplier.java:71)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.vault.config.ClientAuthenticationFactory.pcfAuthentication(ClientAuthenticationFactory.java:440)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.vault.config.ClientAuthenticationFactory.createClientAuthentication(ClientAuthenticationFactory.java:140)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at org.springframework.cloud.vault.config.VaultBootstrapConfiguration.clientAuthentication(VaultBootstrapConfiguration.java:248)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-04-28T10:28:47.608-04:00 [APP/PROC/WEB/0] [OUT] at java.lang.reflect.Method.invoke(Method.java:498)