2.4. 创建 attestation 令牌 secret
为红帽构建的 Trustee 生成 attestation 令牌密钥。
流程
运行以下命令,生成名为
token.key的专用 elliptic curve SSL 密钥:$ openssl ecparam -name prime256v1 -genkey -noout -out token.key运行以下命令,从私有 SSL 密钥生成自签名 SSL/TLS 证书:
$ openssl req -new -x509 -key token.key -out token.crt -days 365 \ -subj "/CN=<custom_cn>/O=<custom_org>"-
<custom_cn> : 指定通用名称。例如:kbs-trustee-operator-system。 -
<custom_org> : 指定您的机构名称。
-
从
trustee-operator-system命名空间中的 SSL/TLS 密钥和证书创建attestation-tokensecret:$ oc create secret generic attestation-token \ --from-file=token.crt \ --from-file=token.key \ -n trustee-operator-system