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

purgeUnmanagedConfig does not purge secrets engines' configuration #1843

Open
aabdala opened this issue Mar 23, 2023 · 4 comments
Open

purgeUnmanagedConfig does not purge secrets engines' configuration #1843

aabdala opened this issue Mar 23, 2023 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects

Comments

@aabdala
Copy link

aabdala commented Mar 23, 2023

When using for example the aws secrets engine, deleting configuration entries for that secrets engine when enabling purgeUnmanagedConfig does not seem to be deleting them from vault.

From what I've seen in this code it seems to me that either the whole secrets engine is removed if it is not present in the config, or it is left/tuned and existing and new configuration entries are upserted, but the diffing to remove the ones not present in the config anymore does not seem to be implemented.

As an example, having configured the following (trimmed down for brevity)

  externalConfig:
    secrets:
    - description: AWS secret backend.
      path: aws/
      type: aws
      configuration:
        roles:
        - credential_type: assumed_role
          name: role-1
          role_arns:
          - arn:aws:iam::1234567890:role/role-1
        - credential_type: assumed_role
          name: role-2
          role_arns:
          - arn:aws:iam::1234567890:role/role-2

After deleting the item for role-2 from the Vault CR configuration, a vault read aws/roles/role-2 would still return successfully.

This was tested with bank-vaults version 1.15.8 and vault version 1.10.4

/kind bug

@akijakya
Copy link
Contributor

Hey @aabdala, thanks for using bank-vaults, also sorry for the delay. This sounds more like a feature request for me! 🙂 If you find time to implement it, we would be happy to review and include this feature, i.e. purging unmanaged roles, but even it not, I think this has a place on the roadmap!

@akijakya akijakya added this to To do in Bank-Vaults via automation May 19, 2023
@ebdekock
Copy link

This would be a great feature for declaratively managing vault! Plus one

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR that has become stale and will be auto-closed. label Jan 28, 2024
@ebdekock
Copy link

Bump

@ramizpolic ramizpolic removed the lifecycle/stale Denotes an issue or PR that has become stale and will be auto-closed. label Jan 30, 2024
@bank-vaults bank-vaults deleted a comment from github-actions bot Jan 30, 2024
@ramizpolic ramizpolic added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 30, 2024
Copy link

Thank you for your contribution! This issue has been automatically marked as stale because it has no recent activity in the last 60 days. It will be closed in 20 days, if no further activity occurs. If this issue is still relevant, please leave a comment to let us know, and the stale label will be automatically removed.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR that has become stale and will be auto-closed. label Mar 31, 2024
@csatib02 csatib02 removed the lifecycle/stale Denotes an issue or PR that has become stale and will be auto-closed. label Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
Bank-Vaults
  
To do
Status: 🆕 New
Development

No branches or pull requests

5 participants