ldap_enc face for SERVER-711 issue workaround

10 views
Skip to first unread message

Thomas Müller

unread,
Oct 20, 2016, 5:50:15 AM10/20/16
to Puppet Developers
hi

i've tried to expose the ldap enc as command/face to call `puppet ldap_enc` with node_terminus=exe as a workaround for the SERVER-711 issue in puppetserver.

It works somehow but i've encountered 2 problems:

* Puppet::Node.indirection.find(certname) returns the parameters merged with all the facts. Is it possible to  prevent this merging somehow? Or is it even the right function to call for that? :)

* it does not read settings like the the master applications. so I needed to set the ldap parameters in the main section of puppet.conf. How would one set the run_mode to the same as the master application? tried to add run_mode = :master in application/ldap_enc.rb but "puppet ldap_enc info" still shows run mode: user.



- Thomas


code:
* face: https://github.com/vinzent/puppet-ldap_enc_face/blob/master/lib/puppet/face/ldap_enc.rb
* application https://github.com/vinzent/puppet-ldap_enc_face/blob/master/lib/puppet/application/ldap_enc.rb

https://tickets.puppetlabs.com/browse/SERVER-711
https://docs.puppet.com/guides/ldap_nodes.html

Thomas Müller

unread,
Oct 20, 2016, 8:04:36 AM10/20/16
to Puppet Developers


Am Donnerstag, 20. Oktober 2016 11:50:15 UTC+2 schrieb Thomas Müller:
hi

i've tried to expose the ldap enc as command/face to call `puppet ldap_enc` with node_terminus=exe as a workaround for the SERVER-711 issue in puppetserver.

It works somehow but i've encountered 2 problems:

* Puppet::Node.indirection.find(certname) returns the parameters merged with all the facts. Is it possible to  prevent this merging somehow? Or is it even the right function to call for that? :)

inbetween i've found out that indirector/node/ldap.rb calls info2node and merges facts (with .facts_merge). I've created a subclass of it and changed the info2node function to not call this.

https://github.com/vinzent/puppet-ldap_enc_face/blob/master/lib/puppet/indirector/node/ldap_enc.rb

 
Reply all
Reply to author
Forward
0 new messages