我在 Vault 中创建了一个 CA 来处理我的证书创建。我遵循了以下指南:https://learn.hashicorp.com/vault/secrets-management/sm-pki-engine
我正在尝试使用 Vault 中的 pki 机密引擎生成客户端证书,然后通过以下命令使用 cert auth 方法登录 Vault:
保险库登录-地址=https://xxx.xxx.xxx.xxx:8200-tls-skip-verify -method=cert -ca-cert=cacert.pem -client-cert=cert.pem -client-key=key.key 名称=vaultclnt
我收到的错误:
验证错误:发出 API 请求时出错。
网址:PUThttps://xxx.xxx.xxx.xxx:8200/v1/auth/cert/login 代码:400。错误:
- 证书无效或未提供客户端证书
证书信息:
证书 -----开始证书----- MIIDdzCCAl+gAwIBAgIUSIb1ejlpms0Fqxm4zZaGkrwHUecwDQYJKoZIhvcNAQEL BQAwFjEUMBIGA1UEAxMLdmVyaXpvbi5jb20wHhcNMjAwNjEwMTQ1MTEzWhcNMjAw NjExMjA1MTQzWjAvMS0wKwYDVQQDEyRydmFwYXJ2bmRzdmx0Y2xudDAxLmNzZnAu dmVyaXpvbi5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCW2Fuk 9UADhU6esnuaP/aFdM9CtPnKgVCoWQwF7H3u6hybDxT1W3ko82pdlR0YNVSLCKTU B/tNLPhAmuRNbBW1Kdr2ukQvklAss5c5WPmtzz3iKFQOWP9vQMDvCMSl5MnPKlnx Rd9yykASxXFxRUegMPxiMiToeJmPZ1MiWchuqU984QAx6/SEERiTYisfOpkpJprM VHhjLU9PG3Uq6gxmyjBoDDJSv+TNV7dGGx29xgZR9uOn/zoYUNaVG0/I5cXXnk9x p+g+IvZQ4KMkfPMtoUgx1vyRupYquIO05pUb90Pb4t2SQGL0xDl7XYunqvWtjfd3 jEEoGNN5z/AdsS+BAgMBAAGjgaMwgaAwDgYDVR0PAQH/BAQDAgOoMB0GA1UdJQQW MBQGCCsGAQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUlFD6CgESvEzYXK/uuCgp EFo2gZIwHwYDVR0jBBgwF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fP5oUyFQKBgQC3AKEX7BL4zIHu+kMQzNeG9qJx8PQLDUOg4Iho 8byPBMvY1eqQfu216PP0S/Yrfo65GcZHHTn6uHUtO96kXnTA6/KxkA8sJnf+I22W zNArEzx+kBI1BtAbA27rpDa3mOs+1qIel1KyBX14/t1dP/D/rB+2prOBkCuEzNSX W/aMiQKBgA5JC0jBL9+Guq0iB2LaBKElW84CfZcQ70fnqCtfijJdY1phBBpqEyOc dtX2q6KnmcSH58SFkX3qRBEryOvUKHkkuZi/sjmH3yrqiWeuQP9WUjSp3RuaLyOI btHpD/NaI2f1VJjiPoX+bU+5q4HXKjYBTIDqURCpdA8dzoNFClvP -----结束RSA私钥-----
私钥类型 rsa 序列号 48:86:f5:7a:39:69:9a:cd:05:ab:19:b8:cd:96:86:92:bc:07:51:e7