-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Rewrite vault core, issue AppRoles to minions #62684
Conversation
From the looks of it this is breaking change right? Meaning that people that currently use Vault integration will need to adjust at least their configuration (or worse) to get it working again. If that's the case, I wonder whether it wouldn't make sense deprecating the current modules and provide this as "v2" or similar. |
The intention is for this to be backwards-compatible. The current configuration scheme is translated and in case the master is upgraded before minions, the current runner endpoint is still available, same as with the current public utility functions in case custom modules are using those. They are marked as deprecated though. |
54a3a1f
to
7c8bb50
Compare
b4f7c5c
to
407c82e
Compare
6c73f43
to
5e39bf0
Compare
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
In some cases, the `spec` calls were failing because the underlying object was already patched
@dwoz I resolved the conflicts and fixed the tests, |
@dwoz Today's test run is all green (and merge conflicts are resolved). I have been using this code heavily since its inception and think it has at least a few less rough edges than the current one. Either way, the saltext will be published soon as well, so issues can be dealt with there. Sorry for pinging twice, wanted to give this a chance of landing in core before the final saltext migration. |
Update for anyone that followed this: The first release of You can migrate to the extension at your discretion, it's nearly identical* to what's found in * with some minor deprecations, a bugfix that's still pending for 3007 and a small QoL improvement. |
What does this PR do?
__utils__
use.Migrates tests to pytest.vault
configuration. Compatible with legacypeer_run
config, but it should be updated to avoid unnecessary roundtrips/reduce network overhead.Background
While working on #62674, I noticed the better approach would be to issue AppRoles to minions. Implementing that, I was a bit frustrated with the abstraction level and found myself in a yak shaving situation.
The missing abstraction causes issues such as #62651.
Builds on #62674.
See also: https://discuss.hashicorp.com/t/saltstack-vault-and-host-role-policies/19214
What issues does this PR fix or reference?
Fixes #62380
Fixes #58174
Fixes #62823
Fixes #62825
Fixes #60779
Fixes #57561
Fixes #62828
Fixes #58580
Fixes #43287
Fixes #51986
Fixes #63406
Fixes #63440
Fixes #64096
Fixes #64128
Fixes #64379
Included:
#62552
#59827
Previous Behavior
would behas been relieved a bit by the mentioned pillar templating PR, so that a separate policy is only necessary for each defined role.New Behavior
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes