GitHub explained in "How We Made GitHub Fast"(2009) [1] they patched their ssh daemon, so that it would do some lookups in a MySQL DB.
I wonder if daemons like OpenSSH now have some kind of plugin mechanism that lets one use their own lookup strategy.
Separately, I don't know what other - if any - features a db-backed ssh server needs to provide. Is this all that is necessary?
In our case, the SSH server is not for general purpose, but for something really specific, so it's really easier to test. What other feature? As I will explain next week, our SSH server is actually an authentication/autorization proxy which forwards connections to another server. By building our solution, it is now easier to control the logics for the load balancing etc.
On the other hand, OpenSSH's server has become so big that even when it is perfectly implementing the security contract its authors intend it can still allow users to do things that may surprise the heck out of you. Given what I've seen of trying to secure things that use SSH and really shouldn't, I would believe it might be easier to audit your own server rather than a deployment of opensshd.
That’s two problems in one : we had to find a synchronization mechanism, and, sensitive data are spread out on several machines
I was confused by the implication that public keys are sensitive data. I guess the list of usernames and commands could be?
By sensitive data, we meant part of the identity of all our users (there is quite often user@host at the end of the public keys sent by our users), and the second point is linked to the internal commands.
In the `command="ssh-handler" ssh-rsa....` the command doesn't receive the SSH public key as argument, so we would have to provide additional information like: `command="ssh-handler <user_id|username|key_id>" ssh-rsa....` So yes, if we have a way to avoid having a copy of that on all our servers able to authenticate users, we take it!
Obviously this doesn't solve all problems, but it does provide a middle ground between flat keyfiles and rolling your own daemon.