Until now, we’ve managed all of our SSH users through Ansible (updating user public keys on each server with a playbook).
As we’re expanding, however, we’re starting to add new services within our VPC: email server (Zimbra), internal wiki, etc.
I’m trying to figure out a way to centrally manage all user accounts across these services from a single point. Perhaps with FreeIPA, or OpenLDAP, or another product.
Has any deployed a centralized LDAP solution within their VPC? Any suggestions or hints on best practices/what to avoid?
Probably poor advice but from installing ldap in a standard environment just make sure you have some sort of backdoor into your systems. A non ldap account can be huge in the event something goes bad as I found out once
I installed OpenLDAP on EC2 and have EC2 access for users managed via their LDAP accounts. Our wiki and subversion auth also uses their LDAP accounts. There’s a lot of information available to do this. This was one of the references I used:
We use FreeIPA and although it’s nice, there are some pain points with it (really it’s just too much for a simple LDAP setup but does have cert management, DNS and a few other things integrated in). I would ultimately recommend it, especially if you need more than just LDAP like fine grained controls of various roles, hosts and environments and such.
Active directory with Unix extension for systems. It allowed me to setup SSH+NFS+Autofs+LDAP auth. Practically works on any modern interface with LDAP support.
I use OpenLDAP in combination with a bit of python code to build the users/groups from DynamoDB tables. The DynamoDB tables are the master lists of users/groups, and have a small web interface (more internal code) to manage them. This provides an easy, reliable way to deploy LDAP instances to whatever VPC or AWS account necessary, and as long as that LDAP instance has EC2 role access to the DynamoDB tables, it becomes a stand alone, carbon copy. This is a simple, easy way to centrally manage LDAP and we can rebuild LDAP servers immediately for HA purposes.
Holy crap, this is exactly what I need. Ever think of open sourcing your code, or turning it into an SaaS product? (I would so pay money for a service like this.)
I don’t think it does ssh key management but if you need LDAP, this might be better than running your own and worrying about backups, availability and so on.
No gotchas others than switching the DNS on the NIC to use the AD DNS. You’ve assumed correct, no way to extend POSIX extensions to it. In fact, I tweeted this to @jeffbarr about this when they released the AWS Directory Service saying that it would have been far better if they actually focused on creating PAM modules that would use their directory service for *nix auth. Sadly, it seems they’re more interested in taking a slice in of the M$ market share than actually solving some real-world problems like this. Until then, I’ll just be anti-pattern and setup on-prem AD instances in AWS
I invented it for the company I work for, so it’s considered internal IP. However, I’ve also been tasked with publishing approved things on Github this year, so we’ll see what happens. Either way, it’s fairly easy to come up with the pieces yourself and you no longer have the issue of complicated replication or backups.