In a our previous post, we looked at generating a 1password session without requiring user input. Today we will look at generating a one-time (30-minute) token on your local machine and only sharing that with your build servers.
op get item db_password --session $(cat opsession)
Did you know 1Password has a CLI tool? In this article we will write a small script using expect called opsession
to better manage secrets in our automation pipeline. Using opsession
you can then use 1password op
commands like
op get item db_password --session $(opsession)
Without having any user intervention.
I have been looking at using 1Password’s CLI tool to better manage secrets on the terminal. 1Password strongly recommends you verify your download.
I decided to write a small shapkgsum script in golang to make that verification easier to automate.