Show HN: No 1Password API? Host One Yourself

2 points by gchamonlive ↗ HN
I had a recent task of automatically syncing SSL keys that are dropped in an S3 bucket to 1password, so that every instance created using our terraform module is instantly categorized in our ssl vault. Thing is, there was no direct way of doing it...

Just a cli, which can't be shipped to AWS Lambda. So I built a python wrapper around it (https://github.com/lettdigital/onepassword-python) that I could then wrap in a WSGI server.

Here is the API you can host yourself: https://github.com/lettdigital/onepassword-api

Just `docker-compose up -d` and you are good to go. Really, no need to even download the cli, it is all taken care of.

One thing to notice is that there are two authentication methods. Well, actually only one, but there are two types of submission: passing your credentials everytime or using the `login` route and then using the token+shorthand returned. This means that the API is stateful :(

One other thing. I opted to use GET routes with request body. I couldn't find another way of doing these routes without resorting to a custom Authentication header, so any suggestion would be much appreciated.

0 comments

[ 2.6 ms ] story [ 7.2 ms ] thread

No comments yet.