puppetlabs/puppet — pull request #269 by jamtur01 (2011-12-13 20:01:16+00:00)
Title: Prototype code for #7243 - Additional data in Puppet CSRs

This adds the ability to add arbitrary attributes to Puppet certificate
requests. It is controlled by setting the allow_csr_attributes setting
in the puppet.conf configuration file on the Puppet agent.

allow_csr_attributes = true

This option defaults to false. If set to true it looks for a YAML file,
csrattributes.yaml, located by default in /etc/puppet but location is
controllable via the csr_attributes_file option in puppet.conf.

Inside this file you can speicfy a list of OIDs and values in the form
of a YAML hash, for example:

---
1.3.6.1.4.1.34380.2.1: 'attrval1'
1.3.6.1.4.1.34380.2.2: 'attrval2'

When the Puppet CSR is generated these values will be added to the CSR
that is passed to the Puppet master. You can then inspect them using:

openssl req -in name.of.csr.file.pem -noout -text

This will return the detailed certificate request and you should see in
the attributes section:

Attributes:
testoid1 :unable to print attribute
testoid2 :unable to print attribute

This is entirely prototype code and I've fixed any tests broken by its
introduction but not added any new tests.

This patch also adds the contents of certdnsnames to the CSR being generated
on the Puppet agent as Extensions.