大网数据广告活动
服务器运维问答

OCSP setup for Vault

· 52CE 我爱测

I have vault setup running in container for PKI Secrets Engine and would like to add OCSP support for application to check if certificate is not revoked. I didn’t find any explanation on how to setup OCSP for vault also not clear…

问题原文

原帖链接 · rp346 · CC BY-SA 4.0

I have vault setup running in container for PKI Secrets Engine and would like to add OCSP support for application to check if certificate is not revoked. I didn’t find any explanation on how to setup OCSP for vault also not clear information in any of the blogs.

In my setup I have configure following for CRL

vault write pki/config/urls \
        issuing_certificates="http://127.0.0.1:8200/v1/pki/ca" \
        crl_distribution_points="http://127.0.0.1:8200/v1/pki/crl"

But nothing beyond this for OCSP

Do I need to setup separate service for OSCP or Vault can handle this itself ?

Any help on this to understand OCSP for Vault would be appreciated ?

已采纳解答

原帖链接 · ixe013 · CC BY-SA 4.0

OCSP responder are not handled by Vault. The best you can do is set the URL to some custom OCSP responder calling Vault on the client's behalf with the ocsp_servers parameter in the same API call:

vault write pki/config/urls \
        issuing_certificates="http://127.0.0.1:8200/v1/pki/ca" \
        crl_distribution_points="http://127.0.0.1:8200/v1/pki/crl" \
        ocsp_servers="http://127.0.0.1:8200/v1/pki/ocsp"

These URL are the URL that will be in the certificate. It must make sense for the client, not Vault. In other words, using 127.0.0.1 will never work elsewhere than on your laptop.

Also keep in mind that CRL and OCSP must be accessible over http, not https. In a production configuration, you will/should have Vault reachable over HTTPS only. You might have to put a reverse proxy in front of Vault to offer the CRL and OCSP endpoint.

vault write pki/config/urls \
   issuing_certificates="http://vault.example.com/v1/pki/ca" \
   crl_distribution_points="http://vault.example.com/v1/pki/crl" \
   ocsp_servers="http://vault.example.com/my-custom/ocsp-responder"

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-06-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。