Open WojciechRydel opened 1 year ago
Same problem here.
aws-vault --debug exec profile -- thing
2023/06/15 15:28:49 aws-vault v7.2.0
2023/06/15 15:28:49 Using prompt driver: terminal
2023/06/15 15:28:49 Loading config file /home/me/.aws/config
2023/06/15 15:28:49 Parsing config file /home/me/.aws/config
2023/06/15 15:28:49 [keyring] Considering backends: [secret-service]
2023/06/15 15:28:49 profile profile: using credential process
2023/06/15 15:28:49 Setting subprocess env: AWS_REGION=eu-west-1, AWS_DEFAULT_REGION=eu-west-1
As workaround AWS_VAULT_FILE_PASSPHRASE="" aws-vault --backend=file exec profile -- thing
can be used.
We have two issues here. First, aws-vault tries to create new collection (KeepassXC database) if a collection called aws-vault
doesn't exist. We can fix it by adding the --secret-service-collection
to the command. The collection for KeepassXC is the name of your database without the file extension. If you password database is password.kdbx
the flag would be called aws-vault --secret-service-collection password
. (There are some quirks. E.g. a hyphen in the filename would be escaped).
Now the prompt is working, but aws-vault freezes afterwards. There's another bug in the go-libsecret library causing this: https://github.com/gsterjov/go-libsecret/pull/5
To get it working we can use the patch from @Neverous. (thanks by the way :grin: )
replace (
github.com/gsterjov/go-libsecret => github.com/Neverous/go-libsecret v0.0.0-20230212130815-609c8590032b
)
go build
Now aws-vault should work with KeepassXC if you use it as follows
aws-vault --secret-service-collection YOUR_KEEPASSXC_DATABASE_FILENAME_WITHOUT_EXTENSION
I recommend adding this command as an alias.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Still using totally unmaintained go-libsecret
https://github.com/99designs/aws-vault/blob/e22aea12b03e8ce036e9af87dda9303806fa2a9e/go.mod#L35
Related to automatically staled and closed https://github.com/99designs/aws-vault/issues/904#issuecomment-1648799564
.aws/config
(redacted if necessary)aws-vault --debug
(redacted if necessary)aws-vault --debug
outputI am using KeepassXC as the SecretService underhood. Every execution of e.g.
secret-tool lookup xx yy
calls KeepassXC to retrieve secret.When I configure
aws-vault
to use SecretService as its backend, each time I want to store some value, I am prompted to create a new KeepassXC database.