hologram icon indicating copy to clipboard operation
hologram copied to clipboard

Support openssh authorized_keys format for sshPublicKey ldap field

Open copumpkin opened this issue 10 years ago • 3 comments

This is probably incompatible with how you've structured things internally, but it seems a tad more user-friendly (and also more compatible with what github enterprise excepts from an LDAP server). The difference boils down to calling ssh.ParseAuthorizedKey in the key loop in usercache.go instead of base64.StdEncoding.DecodeString and then ssh.ParsePublicKey. Perhaps it could be configurable?

I'm also happy to make PRs for these changes, if that's helpful.

copumpkin avatar Feb 23 '15 21:02 copumpkin

Anyone have thoughts on this feature request? My main issue is that the current key format seems fairly nonstandard, whereas I can just pipe ~/.ssh/id_*.pub into an ldap modification tool with ParseAuthorizedKey.

copumpkin avatar Mar 10 '15 14:03 copumpkin

Hey,

I certainly agree that the current way of doing this is awkward, and I'd much rather see something like what you suggest, we'd probably need to make it another config option (or maybe try to autodetect with fallback?) as I don't see us changing the way these are stored internally at the moment.

But yeah, I'd like to see this happening.

frangarciam avatar Mar 10 '15 14:03 frangarciam

Reopening as hologram-authorize support is needed.

We need a flag to hologram-authorize that allows us to upload the keys in authorized_keys format instead of the current format, so users can decide what format to upload the keys in.

This is probably best done at the same time or after https://github.com/AdRoll/hologram/issues/36

frangarciam avatar Apr 01 '15 17:04 frangarciam