-
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
Add pillar support for vault policy assignment #62889
Conversation
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
policy_patterns = config.get( | ||
"policies", ["saltstack/minion/{minion}", "saltstack/minions"] | ||
) | ||
mappings = {"minion": minion_id, "grains": grains or {}} | ||
mappings = {"minion": minion_id, "grains": grains or {}, "pillar": pillar or {}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this also impact the vault execution module. I believe it should based off the code I read, but wanted to verify this since you are only editing the runner module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will also require a changelog and I just had one clarifying question
This approach has the problem that a) either the token policies are not reliable (when only cached minion pillar data is used, as should be the case here) or For context, see the linked (unmerged) PRs in #62674 (shameless plug: PR I wrote to overcome these issues, still needs a review :]). |
This PR has a very limited scope -> only the policy assignment via pillar
PR #62674 looks very promising |
I agree that only relying on cached pillar data is sufficient in most cases. There have been several PRs with the exact same proposed change that were denied on the grounds of b) (e.g. #43288), but I am pretty sure the described cyclic dependency cannot happen if you only rely on
This problem is specific to the vault implementation and is only present when you refresh the pillar during policy rendering: minion requests token -> master renders policies -> refreshes pillar -> some pillar value uses the vault integration -> impersonating master requests token -> master renders policies -> refreshes pillar etc |
@PhilippLemke are you stating you want to close this one in favor of #62674? |
Since #62674 addressed a wider scope, that's OK for me.
Am Mo., 31. Okt. 2022 um 20:34 Uhr schrieb Megan Wilhite <
***@***.***>:
… @PhilippLemke <https://github.com/PhilippLemke> are you stating you want
to close this one in favor of #62674
<#62674>?
—
Reply to this email directly, view it on GitHub
<#62889 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABS3HYGWDLUO5IN2MS7U6TLWGANNTANCNFSM6AAAAAARFC6CK4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Closing in favor of #62674 |
What does this PR do?
SALT.MODULES.VAULT:
Previous Behavior
New Behavior
Merge requirements satisfied?
Commits signed with GPG?