No description
cli
  • Go 98.3%
  • Makefile 1.1%
  • Shell 0.6%
Find a file
Simon Gate 67e92229eb
All checks were successful
continuous-integration/drone/push Build is passing
Update readme
2023-03-29 18:50:06 +02:00
contrib Add wrapper scripts 2023-03-14 22:58:27 +01:00
op Add password entry using pinentry 2023-03-27 14:10:16 +02:00
test/fixture Add test fixture 2023-03-14 22:58:38 +01:00
.drone.yml Disable build step in ci 2023-03-21 11:22:59 +01:00
.gitignore Add git ignore file 2023-03-21 11:01:59 +01:00
.goreleaser.yaml Gorelease to gitea 2023-03-21 11:07:57 +01:00
go.mod Add pinentry module 2023-03-27 14:09:51 +02:00
go.sum Add pinentry module 2023-03-27 14:09:51 +02:00
main.go Add unix pipe support as default 2023-03-29 18:49:50 +02:00
Makefile Add makefile 2023-03-15 08:28:42 +01:00
README.md Update readme 2023-03-29 18:50:06 +02:00

1Password credentials

A tool that uses the op 1Password command line interface to fetch credentials and reformat them into a easy format for other tools to use. This includes fetching of AWS credentials and outputting them for usage with .aws/credentials file.

Requirements

  • pinentry
  • op (1Password cli)

Installation

Download the latest release for you architecture.

  • Unpack with tar -zxvf op-credentials_Linux_x86_64.tar.gz
  • Fix permissions and move into place, chmod 755 op-credentials && sudo chown root:root op-credentials && mv op-credentials /usr/local/bin/
  • Done!

Add keys in your 1Password vault

op-credentials support the item type API Credential. Add your AWS credentials to a vault of you choice and remember their name.

Usage

op-credentials has two modes, either you can use op-credentials to wrap op CLI or you can pipe json output from op to op-credentials.

# Pipe output from op to op-credentials
$ op item get --format json op-credential | op-credentials --output aws

# Find and output credential
$ op-credentials --output aws op-credential

Providers

Setup AWS credentials

op-credentials will fetch a API Credential item from 1Password using op and transform it into a AWS CLI credentials object. This allows for usage in the .aws/credentials file.

[profile default]
credential_process = op-credentials --output aws --vault cli aws-default

Caveats

Permissions and ownership

To use command with 1Password GUI auth the binary needs to fullfill 3 criteria:

  1. Owned by root
  2. Permission is 755
  3. Location is in /usr/bin, /usr/local/bin or similar