【发布时间】:2017-05-16 05:14:59
【问题描述】:
我想删除 Hosted Chef 中的 Chef Vault 项目,但我没有权限并且没有其他 Vault 管理员。
knife vault delete secrets my-secret
ERROR: ChefVault::Exceptions::SecretDecryption: secrets/my-secret
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')
我使用托管厨师,我创建了一个项目,然后删除了我用来创建它的客户端密钥 - 因此我没有管理员。也没有服务器有权使用该项目。什么都没有。
未经许可不会:
- 请允许我删除该项目
- 在当前项目上添加相同的项目
在网站上:
- 我看不到任何用于删除保管库项目的 Hosted-Chef 菜单项。
- You can't delete the organisation either in hosted chef - 这可能是重新开始的一种方式。
如何删除此项目?
将它们当作 data_bag 一样删除:
coderanger建议的答案:
knife vault list
secrets
knife vault show secrets
postfix-auth
# Vault items are just data bag items (two items actually)
# so just delete them via that.
knife data_bag delete secrets postfix-auth -y
Deleted data_bag_item[postfix-auth]
# The second one is the same name but with _keys
# appended and holds the item metadata.
knife data_bag delete secrets postfix-auth_keys -y
Deleted data_bag_item[postfix-auth_keys]
# Just to see I am actually doing something I delete it again
knife data_bag delete secrets postfix-auth_keys -y
ERROR: The object you are looking for could not be found
Response: Cannot load data bag secrets item postfix-auth_keys
# Yes the original delete of postfix-auth_keys did something.
# Lets confirm it ...
# knife vault list now empty!
knife vault list
【问题讨论】:
标签: chef-infra