Hi,
> As you're hopefully aware, most of badger's configuration is in puppet
> [1], which somewhat simplifies the process of setting up its
> replacement. Unfortunately, the version of puppet on F20 is much newer
> than on F17, and as a result, our puppet config needs some work before
> we can use it.
> (there are some
> complications around the LDAP module which I'll post about shortly).
It appears that the LDAP/PAM/NSS setup on badger isn't entirely
simple, and I by no means truly understand all of it. I believe that
Jeremy does, so hopefully he'll dive in and correct anything i get
wrong.
We currently use a modified version of an external module [2] to
handle the initial setup of the LDAP services, and then a custom type
& provider to configure some of the actual entries in the database. We
then also load pre-canned values into the database from the secrets
repo to fill out the data.
The last part is somewhat standard, since the data for a dev server is
going to be different than that on the live server, and this mechanism
is also intended to be used for restoring from a backup.
Unfortunately, the separation between the things in config vs in the
data isn't really in the right place, with some things being in data
where they should probably be config. Thankfully while annoying that
doesn't actually cause any issues.
The real complications come from the combination of the changes we've
made to the ldap module and the fact that the upstream has since been
massively refactored [3]. The changes break down into roughly two
groups: those made were to work around a bug around having a client
and server setup on the same machine, and changes to allow local
definitions of logins to badger to work at the same time as LDAP
logins.
First up, it doesn't appear that the server-client bug was ever
reported upstream, so I've done that [4] and I'll submit a pull
request for my fix [5] shortly.
I've also attempted to reapply our local-login related patches to the
upstream, these appear in the 'srobo-tweaks-on-latest' of my fork [6].
Some review on wether or not that does the right things would be great
-- I didn't want to submit that to gerrit as I'd likely have to submit
the entire upstream for review first.
However, it's notable that unfortunately those changes on their own
still don't get the ldap module working on F20, due to the nss_ldap
package having been retired. I've not yet managed to find out why that
occurred, and I'm not really sure what it achieved so I'm unsure how
to work out what (if anything is needed to replace it). Input here
would be most welcome.
The combined result of my work on getting the ldap module to work on
F20 as we need it can be found in the 'srobo-tweaks+f20' branch [7] of
my github fork. This is the branch which I'm using, and which appears
to work; if you'd like to get involved, this is the branch to drop
into puppet.git/modules/ldap to move beyond the LDAP errors. Again
though, this needs some review from someone who better understands
what's actually happening to LDAP as a result of the specified
configs.
Peter
[1]
https://www.studentrobotics.org/cgit/server/puppet.git
[2] Specifically, the upstream is here:
https://github.com/jfryman/puppet-openldap, though that's not
documented anywhere I'm aware of, and our modifications live in
https://www.studentrobotics.org/cgit/server/ldap.git
[3] Ironically, this appears to have happened within weeks of us
having applied our modifications.
[4]
https://github.com/jfryman/puppet-openldap/issues/12
[5]
https://github.com/PeterJCLaw/puppet-openldap/tree/fix-duplicate-package
[6]
https://github.com/PeterJCLaw/puppet-openldap/tree/srobo-tweaks-on-latest
[7]
https://github.com/PeterJCLaw/puppet-openldap/tree/srobo-tweaks+f20