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

No longer able to refresh when search_query is empty #409

Open
ineednewpajamas opened this issue Aug 1, 2023 · 0 comments
Open

No longer able to refresh when search_query is empty #409

ineednewpajamas opened this issue Aug 1, 2023 · 0 comments
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.

Comments

@ineednewpajamas
Copy link

ineednewpajamas commented Aug 1, 2023

Version:

4.1.10

Scenario:

I rotated my default user key with

chef-server-ctl delete-user-key
chef-server-ctl add-user-key

and am no longer able to access vault items even if i'm an admin and i receive this message:

ERROR: ChefVault::Exceptions::SecretDecryption: vault/item is encrypted for you, but your private key failed to decrypt the contents.  (if you regenerated your client key, have an administrator of the vault run 'knife vault refresh')

When I use an administrator to run knife vault refresh vault item, i get:

ERROR: ChefVault::Exceptions::SearchNotFound: vault/item does not have a stored search_query, probably because it was created with an older version of chef-vault. Use 'knife vault update' to update the databag with the search query.

I've read the docs and it does not mandate that search_query is required when creating a vault item, we have items covering the following scenarios:

  1. no client and no search_query (only admin access)
  2. set clients (using -C) and no search_query
  3. search_query

Expected Result:

Able to refresh (or another method) vault items that have no search_query so that my regenerated knife client key has access.

@ineednewpajamas ineednewpajamas added Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected. labels Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

1 participant