Getting ssh public keys from Phab


#1

Github, Gitlab (and others?) allow you to make a public get request to <insert github/gitlab url here>/<your username>.keys to gain access to your public keys. This is useful to integrate into your sshd configs on hosts.

We have an internal phabricator that conveniently has everybody’s keys. Does phabricator have a similar option? (I believe you can get these out of conduit, but that’s a bit more work than I was hoping for.)

reference:

Thanks in advance!


#2

Conduit is the way to get information out of Phabricator; It doesn’t allow for un-authenticated access though, so you’ll need to provide your client with access token.
You’ll also need to find the user’s PHID in order to only get the right key, which you can get using user.search api.


#3

Thanks for the response. I was hoping there was an easier way than conduit (not that conduit is particularly hard).
It’s not so bad though. I already have a rest bot that speaks to conduit, so if I build the call in there, then my *nix systems can make a simple anonymous curl call to the bot to get the info.

Thanks :slight_smile: