13.2. 为 mTLS 使用专用信任存储
默认情况下,红帽构建的 Keycloak 使用 System Truststore 来验证证书。详情请参阅 配置可信证书。
如果需要为 mTLS 使用专用信任存储,您可以通过运行以下命令来配置此信任存储的位置:
bin/kc.[sh|bat] start --https-trust-store-file=/path/to/file --https-trust-store-password=<value>
bin/kc.[sh|bat] start --https-trust-store-file=/path/to/file --https-trust-store-password=<value>
可识别的信任存储文件扩展:
-
.p12
、.pkcs12
和.pfx
用于 pkcs12 文件 -
.jks
,以及 jks 文件的.truststore
-
.CA
、.crt
、和.pem
文件
如果您的信任存储没有与其文件类型匹配的扩展名,您还需要设置 https-key-store-type
选项。