1

木偶版:3.6.2

为了简化 ssl 证书的管理,我们的puppet代理使用相同的certnamecertname=agent.puppet.com

当 puppet master 收到 agent 的请求时(hostname: web00.xxx.com),它会执行以certname作为参数的Enc脚本。

node_terminus = exec
external_nodes = /home/ocean/puppet/conf/bce_puppet_bns

木偶日志:

2015-05-06 09:55:34 +0800 Puppet (debug): Executing '/home/ocean/puppet/conf/bce_puppet_bns agent.puppet.com'

如何配置以使 puppet master 将代理的真实主机名/FQDN 传递给Enc脚本,例如:

/home/ocean/puppet/conf/bce_puppet_bns web00.xxx.com

或者如何在Enc脚本中获取代理的主机名/FQDN?

4

2 回答 2

1

不。

$clientcert除了从代理传递的信息外,不要使用任何信息。

不要在不同的代理之间共享证书。

Puppet 中有一个根深蒂固的假设,即每个代理节点都有一个单独的证书。通过尝试这些特技,您将对您的基础设施造成严重破坏

例如,PuppetDB 数据通常按拥有代理的certnames. 这些数据很快就会变得不一致,因为所有代理都称自己是相同的,但当然是完全不同的。

于 2015-05-06T08:37:40.940 回答
0

确保 puppetmaster 这么说

 [master]
   node_name = facter

更改 auth.conf 以便所有部分都具有像这样的“agent.puppet.com”证书

# allow nodes to retrieve their own catalog
path ~ ^/catalog/([^/]+)$
method find
allow $1
allow agent.puppet.com

# allow nodes to retrieve their own node definition
path ~ ^/node/([^/]+)$
method find
allow $1
allow agent.puppet.com

# allow all nodes to access the certificates services
path /certificate_revocation_list/ca
method find
allow *

# allow all nodes to store their own reports
path ~ ^/report/([^/]+)$
method save
allow $1
allow agent.puppet.com

那只是 puppetmaster <=> 客户端,Felix 是对的,如果您使用的是 puppetdb,那也必须进行更改

于 2015-05-06T10:27:23.690 回答