Simplify secret sending procedure with a simple python script
We recently added some services that requires me, to generate and send accesses to users. I’m a lonely DevOps doing this, so I lose quite some time every week with these access requests. I cannot automate generating some of the secrets, because it requires human interaction or 2FA, but I can automate this:
- Secret Gather (after the info has been created)
- Secret creation on OTS
- Secret sending via slack
So I started working on in and I came with this:
access-sender/access-sender.py at master · adsanz/access-sender
You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…
This script will basically:
- Gather a secret from AWS, a file, or the command line
- Generate the secret via onetimesecret API
- Send it via slack, optionally, if you don’t specify an email, no slack message will be sent.
Now I just have to press enter, in what took me 5 minutes per user.