14. Vault Client SSL 配置

SSL 可通过设置各种属性进行声明式配置。 您可以设置 javax.net.ssl.trustStore 以配置 JVM 级别的 SSL 设置,或设置 spring.cloud.vault.ssl.trust-store 仅为 Spring Cloud Vault Config 配置 SSL 设置。spring-doc.cadn.net.cn

spring.cloud.vault:
    ssl:
        trust-store: classpath:keystore.jks
        trust-store-password: changeit
        trust-store-type: JKS
        enabled-protocols: TLSv1.2,TLSv1.3
        enabled-cipher-suites: TLS_AES_128_GCM_SHA256
  • trust-store 设置信任存储的资源。 SSL 加密的 Vault 通信将使用指定的信任存储验证 Vault 的 SSL 证书。spring-doc.cadn.net.cn

  • trust-store-password 设置信任存储库的密码spring-doc.cadn.net.cn

  • trust-store-type 设置信任存储的类型。支持的值包括所有支持的 KeyStore 类型包括 PEMspring-doc.cadn.net.cn

  • enabled-protocols 设置启用的 SSL/TLS 协议列表(自 3.0.2 起)。spring-doc.cadn.net.cn

  • enabled-cipher-suites 设置启用的 SSL/TLS 密码套件列表(自 3.0.2 起)。spring-doc.cadn.net.cn

请注意,当您的类路径上包含 Apache Http Components 或 OkHttp 客户端时,配置 spring.cloud.vault.ssl.* 才能适用。spring-doc.cadn.net.cn