The bitwarden secret provider resolves values with the bw CLI session.
CLI session after bw login and bw unlock:
[providers]
paths = ["~/.config/lssh/providers/provider-secret-bitwarden"]
[provider.bitwarden]
plugin = "provider-secret-bitwarden"
enabled = true
capabilities = ["secret"]
auth_mode = "cli"
[server.db]
addr = "10.0.0.20"
user = "admin"
pass_ref = "bitwarden:item-id/password"CLI session with an explicit session token:
[provider.bitwarden]
plugin = "provider-secret-bitwarden"
enabled = true
capabilities = ["secret"]
auth_mode = "cli"
session_env = "BW_SESSION"providers.pathsis intended to list provider executable files.auth_modecan be one of:autocli
auth_mode = "auto"is the default.auth_mode = "auto"currently behaves the same asclifor backward compatibility.auth_mode = "sdk"is no longer supported.- The provider uses the
bwcommand.- Log in with
bw login - unlock with
bw unlock - or provide
session,session_env, orsession_source
- Log in with
bw_pathcan be used to override the CLI path. If omitted,bwis used.appdata_dircan be used to setBITWARDENCLI_APPDATA_DIRfor the CLI.- This is useful if you want the provider to use a specific Bitwarden CLI data directory.
appdata_dir_envandappdata_dir_sourceare also supported through the common config value resolver.
- Ref format is
bitwarden:<locator>/<field>.- The provider uses the last
/as the field separator. - This means names or path-like locators such as
bitwarden:folder/item/keycan be used naturally.
- The provider uses the last
- The provider is intended for Bitwarden Password Manager item refs.
- Supported fields are
value,password,username,uri,totp,note,notes,key,public_key,fingerprint, andfield:<name>. valueis treated the same aspassword.keyreturnssshKey.privateKeyfirst, then top-levelkey, then custom fieldkey, and finallynotes.public_keyreturnssshKey.publicKey.fingerprintreturnssshKey.keyFingerprint.field:<name>returns a custom field value from the item, for examplebitwarden:item-id/field:ssh_key.
- Supported fields are