Skip to content

本文为 SPIRE 官方文档 plugin_agent_nodeattestor_sshpop 的中文译本,以英文原文为准。 🔗 穿越源码分析:Agent 详解 · NodeAttestor

Agent 插件:NodeAttestor "sshpop"

必须与服务端 sshpop 插件配合使用

sshpop 插件为通过带外(out-of-band)机制预置了 SSH 身份的节点提供认证数据,并响应由 Server 插件发起的、基于签名的持有证明(proof-of-possession)挑战。

服务端 sshpop 插件所生成的 SPIFFE ID 基于证书指纹(fingerprint),该指纹是 OpenSSH 格式证书的 SHA256 哈希值经过无填充(unpadded)的 URL 安全 base64 编码后得到的。

xml
spiffe://<trust_domain>/spire/agent/sshpop/<fingerprint>
配置项说明默认值
host_key_pathOpenSSH 格式私钥在磁盘上的路径。"/etc/ssh/ssh_host_rsa_key"
host_cert_pathOpenSSH 格式证书在磁盘上的路径。"/etc/ssh/ssh_host_rsa_key-cert.pub"

一个示例配置:

hcl
    NodeAttestor "sshpop" {
        plugin_data {
            host_cert_path = "./conf/agent/dummy_agent_ssh_key-cert.pub"
            host_key_path = "./conf/agent/dummy_agent_ssh_key"
        }
    }