我正在尝试在 Spring Boot 项目中使用 Spring Cloud Vault 使用 HashiCorp Vault。我将bootstrap.yml文件配置为使用应用程序角色和秘密 ID 来获取密码
引导程序.yml
spring:
application:
name: pres
cloud:
vault:
authentication: APPROLE
app-role:
role-id: ${role-id}
secret-id: ${secret-id}
role: pres-read
app-role-path: approle
uri: https://hostname:8200
kv:
enabled: true
backend: secret
application-name: pres
profiles:
include: dev
在启动期间,我得到以下异常
org.springframework.vault.authentication.VaultLoginException: Cannot login using org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://hostname:8200/v1/auth/approle/login": extension (5) should not be presented in certificate_request; nested exception is javax.net.ssl.SSLHandshakeException: extension (5) should not be presented in certificate_request
我正在使用 spring-cloud-starter-vault-config 依赖项来访问保险库
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-vault-config</artifactId>
<version> 2.2.2.RELEASE</version>
</dependency>