1Password / terraform-provider-onepassword

Use the 1Password Terraform Provider to reference, create, or update items in your 1Password Vaults.
https://1password.com/secrets
MIT License
323 stars 44 forks source link

Authenticate 1Password CLI with biometric unlock using user account #119

Closed volodymyrZotov closed 9 months ago

volodymyrZotov commented 9 months ago

This PR introduces an additional way to authenticate 1Password CLI with biometric unlock using user account. This is useful when running the terraform commands directly from the machine where 1Password App is installed (aka personal machines).

As this feature uses 1Password CLI users should turn on the app integration in their 1Password app to use it. See this documentation on how to do that.

The benefit of using this over 1Password service account, is that there is no quotas and no such strict rate limits. Read more about 1Password service account quotas and rate limits here.

Authenticate CLI with user account using biometric unlock

To authenticate CLI with user account using biometric unlock:

  1. Turn on the app integration
  2. In the terminal run op account ls to find sign-in address or account ID. It will print similar output in the console:
    URL                        EMAIL                                         USER ID
    acme.dev.com               test.user@acme.com                            HERE_WILL_BE_REAL_USER_ID
    acme.prod.com              prod.user@acme.com                            HERE_WILL_BE_REAL_USER_ID
  3. Set account in the provider configuration with the URL or USER ID value from the previous step.
  4. When the biometric unlock popup appears while running terraform command, authenticate it using fingerprint or password.

Resolves #113

jillianwilson commented 9 months ago

Code logic looks good, just noted some grammatical errors to fix.