Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

99designs/keyring v1.1.4; fix linux / secret-service bug #521

Merged
merged 1 commit into from
Feb 11, 2020

Conversation

pda
Copy link
Collaborator

@pda pda commented Feb 11, 2020

Fixes #513

1c0b58a from #481 released in v5.1.0, as part of a substantial overhaul, introduced a keyring.Has(key) check where previously it just hoped for the best and the aws-sdk ended up attempting to Keyring.Get(key) as part of the credential provider. In the secret-service backend (linux / libsecret / gnome keyring), Get was unlocking the item as needed, but Has was not unlocking the items/collection; instead it would return empty strings for a locked collection.

99designs/keyring#61 fixes the upstream Keyring.Has() bug, and this patch brings the resulting v1.1.4 release into aws-vault.

This go.mod & go.sum update is the result of:

go get -u github.com/99designs/[email protected]

Manual testing:

# lock all keyring collections
gnome-keyring-daemon -r -d
# ** Message: 15:49:25.164: Replacing daemon, using directory: /run/user/1000/keyring
# GNOME_KEYRING_CONTROL=/run/user/1000/keyring
# SSH_AUTH_SOCK=/run/user/1000/keyring/ssh

# demonstrate bug in previous version
./aws-vault-5-2-0 exec testprofile -- aws sts get-caller-identity
aws-vault: error: exec: Error getting temporary credentials: profile testprofile: credentials missing

# demonstrate fix
./aws-vault exec testprofile -- aws sts get-caller-identity
# {
#     "UserId": "AID______________",
#     "Account": "___________",
#     "Arn": "arn:aws:iam::_________:user/_______"
# }

This go.mod & go.sum update is the result of:

    go get -u github.com/99designs/[email protected]
@pda pda requested a review from mtibben February 11, 2020 04:52
@mtibben mtibben merged commit 5792465 into master Feb 11, 2020
@mtibben mtibben deleted the upgrade-keyring-fix-linux-secret-service branch February 11, 2020 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-vault >= 5.1 fails to open keyring on linux
2 participants