/SecretManagement.1Password

This is a SecretManagement extension for 1Password.

Primary LanguagePowerShellMIT LicenseMIT

SecretManagement extension for 1Password

This is a SecretManagement extension for 1Password. It leverages the 1password-cli to interact with 1Password.

Prerequisites

You can get the SecretManagement module from the PowerShell Gallery:

Using PowerShellGet v2:

Install-Module Microsoft.PowerShell.SecretManagement -AllowPrerelease

Using PowerShellGet v3:

Install-PSResource Microsoft.PowerShell.SecretManagement -Prerelease

Installation

You an install this module from the PowerShell Gallery:

Using PowerShellGet v2:

Install-Module SecretManagement.1Password

Using PowerShellGet v3:

Install-PSResource SecretManagement.1Password

Registration

Once you have it installed, you need to register the module as an extension:

Register-SecretVault -Name vaultname -ModuleName SecretManagement.1Password -VaultParameters @{AccountName = 'myaccountname'; EmailAddress = 'user@youremail.com'; SecretKey = 'secretkey-for-your-account'}

Note: The name you provide the Name parameter needs to match an existing vault in 1Password. If you want to access more than oen 1Password vault you need to register them separately with Register-SecretVault

Vault parameters

The module also has the following vault parameter that must be provided at registration.

AccountName

Your 1Password account name.

https://myaccountname.1password.com/
        ^^^^^^^^^^^^^

EmailAddress

The email address you use to log into 1Password.

SecretKey

The SecretKey for your 1Password vault. Find your Secret Key or Setup Code