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

Add vault database secret engine modules #63314

Closed
wants to merge 67 commits into from
Closed

Conversation

lkubb
Copy link
Contributor

@lkubb lkubb commented Dec 13, 2022

What does this PR do?

Adds modules that allow to manage the Vault database secret engine.

This is based on the improved Vault integration found in #62684, thus this will stay a draft until that PR is merged. I wanted to put this out anyways for visibility and to get possible input.

Note that the tests only verify the mysql database plugin. I cannot test all possible plugins, so there might be some issues left.

What issues does this PR fix or reference?

TODO

Merge requirements satisfied?

Commits signed with GPG?

Yes

lkubb and others added 30 commits October 4, 2022 23:40
This commit represents a fundamental rewrite in how Salt interacts with
Vault. The master should still be compatible with minions running the
old code. There should be no breaking changes to public interfaces and
the old configuration format should still apply.

Core:
- Issue AppRoles to minions
- Manage entities with templatable metadata for minions
- Use inbuilt Salt cache
- Separate config cache from token cache
- Cache: introduce connection-scope vs global scope

Utility module:
- Support being imported (__utils__ deprecation)
- Raise exceptions on queries to simplify response handling
- Add classes to wrap complexity, especially regarding KV v2
- Lay some groundwork for renewing tokens

Execution module:
- Add patch_secret
- Add version support to delete_secret
- Allow returning listed keys only in list_secret
- Add policy_[fetch/write/delete] and policies_list
- Add query for arbitrary API queries

State module:
- Make use of execution module
- Change output format

Docs:
- Update for new configuration format
- Correct examples
- Add configuration examples
- Add required policies
* Always use session cache as well
* Also flush session cache when requested
* Make KV metadata caching behavior configurable
* Update tests to account for changes from prev commit
There is no simple way to ensure they are kept.
lkubb added 13 commits January 3, 2023 23:29
* assert what you get against what you expect
* drop empty parentheses after wrapper
* use `is` to compare against strictly boolean vars
* during pillar rendering, they were always reset by the master (for
  AppRoles)
* overrides were only respected for some settings (AppRoles)
* old config syntax was using the old syntax internally (tech debt)
after renaming the token cache key
@lkubb
Copy link
Contributor Author

lkubb commented Nov 16, 2023

Closing this since the code this depends on has been moved to https://github.com/salt-extensions/saltext-vault, will submit this there later.

@lkubb lkubb closed this Nov 16, 2023
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.

1 participant