from: 1password reads from 1Password
through a service account when the workspace starts. The value stays in the
memory of the process running the workspace; see
how credentials work.
Install
- Python
- TypeScript
Install the extra where Mirage runs:
Create a service account
- Sign in to 1Password.com and open Developer > Directory. Under Infrastructure Secrets Management, select Other, then Create a Service Account.
- Give it read access to the vaults the workspace uses.
- Select Create Account, then Save in 1Password. The token is shown only once.
mirage daemon restart after setting the token.
Point at a field
In 1Password, open the item and choose Copy Secret Reference on a field. Use the reference asref, and the field’s name, its last part, as key:
workspace.yaml
Read several fields from one item
A reference to the item, without a field, reads all of its fields together, after looking up the vault and item.key then picks a field by its label. For
an item AWS with fields labelled access_key_id and secret_access_key:
workspace.yaml
key: notesPlain.
Use another service account
To read with a different service account, declare a source with its token and use its name infrom:
workspace.yaml
env or a dotenv file.