【问题标题】:puppet Forbidden request /puppet-ca/v1/certificate/capuppet 禁止请求 /puppet-ca/v1/certificate/ca
【发布时间】:2018-08-18 05:13:35
【问题描述】:

我无法让 puppet 节点加入 master,我在 AWS 云上使用 puppet 企业。

大师

puppetserver --version
puppetserver version: 2017.3.0.38

节点

# puppet agent --test
Error: Could not request certificate: Error 403 on SERVER: Forbidden request: /puppet-ca/v1/certificate/ca (method :get). Please see the server logs for details.
Exiting; failed to retrieve certificate and waitforcert is disabled

显然错误消息与主端的权限有关,当我检查主端的日志时,我看到了

ERROR [qtp2147089302-255] [p.t.a.rules] Forbidden request: 10.0.10.224 access to /puppet-ca/v1/certificate/ca (method :get) (authenticated: false) denied by rule 'puppetlabs certificate'.

但我检查了 auth.conf 的新 HOCON 格式是否允许未经身份验证的节点发送 CSR

{
            "allow-unauthenticated": "*",
            "match-request": {
                "method": "get",
                "path": "/puppet-ca/v1/certificate/",
                "query-params": {},
                "type": "path"
            },
            "name": "puppetlabs certificate",
            "sort-order": 500
        }

我还检查了 pe-puppet-server.conf 没有使用旧的 auth.conf 方法

# (optional) Authorize access to Puppet master endpoints via rules specified
# in the legacy Puppet auth.conf file (if true or not specified) or via rules
# specified in the Puppet Server HOCON-formatted auth.conf (if false).
use-legacy-auth-conf: false
max-active-instances: 2
max-requests-per-instance: 0
environment-class-cache-enabled: true

请指教,windows和linux都出现同样的错误消息

【问题讨论】:

  • 不确定,但"path": "/puppet-ca/v1/certificate/" 与请求不匹配/puppet-ca/v1/certificate/ca

标签: puppet aws-opsworks puppet-enterprise


【解决方案1】:

我确实重新启动了整个服务器(ec2 实例),因为重新加载 puppetserver 没有帮助......我还按照此处的说明从控制台更改了身份验证

windows Puppet agent does not connect to the awsopsworks puppet Enterprise master

【讨论】:

    【解决方案2】:

    我在尝试设置我的 puppet 节点时遇到了类似的问题,但我使用的是 Vagrant 而不是 AWS。

    解决方法是取消设置以下环境变量:http_proxyhttps_proxyHTTP_PROXYHTTPS_PROXY

    【讨论】:

      【解决方案3】:

      我的解决方法是从 puppet.conf 中删除 server_list,清理 CM 证书并重新生成证书。就我而言,我有autosign=true,所以过程是:

      1. 在 CM 上停止 PE:
      systemctl stop puppet pxp-agent pe-puppetserver pe-puppetdb
      
      1. 删除 ssl 目录
      rm -fr /etc/puppetlabs/puppet/ssl
      
      1. 从主节点清理证书:
      puppetserver ca clean --certname='<CM>'
      
      1. 在 CM 上运行 puppet 代理
      puppet agent -t
      

      完成。

      【讨论】:

        猜你喜欢
        • 2014-12-15
        • 1970-01-01
        • 2015-11-14
        • 1970-01-01
        • 1970-01-01
        • 2020-06-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多