LIST

1password cli using environment variables in command line with bash

Does NOT work: op run – … export TEST_USER_NAME=op://your-vault-name/TEST_USER/username export TEST_USER_PASSWORD=op://your-vault-name/TEST_USER/password op run -- echo ${TEST_USER_NAME} ${TEST_USER_PASSWORD} > op://your-vault-name/TEST_USER/username op://your-vault-name/TEST_USER/password Works: op run – bash -c ‘…’ export TEST_USER_NAME=op://your-vault-name/TEST_USER/username export TEST_USER_PASSWORD=op://your-vault-name/TEST_USER/password op run -- bash -c 'echo ${TEST_USER_NAME} ${TEST_USER_PASSWORD}' > foo-username foo-password If it’s just checking if you didn’t have a type, it’s much easier to run op run -- printenv TEST_USER_NAME op run -- printenv TEST_USER_PASSWORD which gives you useful errors like...

September 14, 2022

Debug typescript file with breakpoints (credentials via 1password)

because: aws credentials - don’t store plaintext op run -- node inspect -r ts-node/register hello.test.ts (src: Debugger _ Node.js v18.9.0 Documentation & AWS & Typescript Masterclass - Testing and debugging Lambdas #31) From the terminal itself (src: How To Debug Node.js with the Built-In Debugger and Chrome DevTools _ DigitalOcean) from intellij (Run_Debug Configuration_ Attach to Node.js_Chrome _ IntelliJ IDEA) inspired by the AWS Toolkit for IntelliJ...

September 9, 2022

aws credentials - don't store plaintext

prerequisites aws cli 1password v8 with cli enabled optional direnv for folder specific config (export env var) export AWS_ACCESS_KEY_ID=op://your-vault-name/AWS_CLI/username export AWS_SECRET_ACCESS_KEY=op://your-vault-name/AWS_CLI/credential alias aws="op run -- /usr/local/bin/aws" alias cdk="op run -- /usr/local/bin/cdk" alias sam="op run -- /usr/local/bin/sam" alias ts-node="op run -- node -r ts-node/register" Done you can now run aws commands aws s3 ls

September 7, 2022