【问题标题】:Delete chef vault items without admin rights删除没有管理员权限的 Chef Vault 项目
【发布时间】: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')

我使用托管厨师,我创建了一个项目,然后删除了我用来创建它的客户端密钥 - 因此我没有管理员。也没有服务器有权使用该项目。什么都没有。

未经许可不会:

  • 请允许我删除该项目
  • 在当前项目上添加相同的项目

在网站上:

如何删除此项目?


将它们当作 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


    【解决方案1】:

    保险柜项目只是数据包项目(实际上是两个项目),所以只需通过它删除它们。第二个名称相同,但附加了 _keys 并保存项目元数据。

    【讨论】:

      猜你喜欢
      • 2021-06-14
      • 2020-04-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-24
      • 2012-07-06
      相关资源
      最近更新 更多