-
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
Improve Vault templating (policies, ext_pillar paths) #62674
Conversation
c2c7a65
to
0b34295
Compare
a6c9f60
to
d37e6b9
Compare
This commit allows to template vault ext pillar paths with previously rendered pillar values.
d37e6b9
to
ecdd9d0
Compare
Hi! I'm your friendly PR bot!You might be wondering what I'm doing commenting here on your PR. Yes, as a matter of fact, I am... I'm just here to help us improve the documentation. I can't respond to Okay... so what do you do? I detect modules that are missing docstrings or "CLI Example" on existing docstrings! So what does that have to do with my PR? I noticed that in this PR there are some files changed that have some of these Okay, what are they? Well, my favorite, is that since you were making changes here I'm hoping that If I can, then what? Well, you can either add them to this PR or add them to another PR. Either way is fine! Well... what if I can't, or don't want to? That's also fine! We appreciate all contributions to the Salt Project. If you Whatever approach you decide to take, just drop a comment here letting us know! Detected Issues (click me)Check Known Missing Docstrings...........................................Failed - hook id: invoke - exit code: 1 Thanks again! |
1 similar comment
Hi! I'm your friendly PR bot!You might be wondering what I'm doing commenting here on your PR. Yes, as a matter of fact, I am... I'm just here to help us improve the documentation. I can't respond to Okay... so what do you do? I detect modules that are missing docstrings or "CLI Example" on existing docstrings! So what does that have to do with my PR? I noticed that in this PR there are some files changed that have some of these Okay, what are they? Well, my favorite, is that since you were making changes here I'm hoping that If I can, then what? Well, you can either add them to this PR or add them to another PR. Either way is fine! Well... what if I can't, or don't want to? That's also fine! We appreciate all contributions to the Salt Project. If you Whatever approach you decide to take, just drop a comment here letting us know! Detected Issues (click me)Check Known Missing Docstrings...........................................Failed - hook id: invoke - exit code: 1 Thanks again! |
2033394
to
aa6bff3
Compare
What does this PR do?
I am aware of the several attempts to introduce the behavior found in (1). The way it is implemented in this PR should prevent the mentioned issues. For reference:
#43288
#49343
#48829
This builds on the ext_pillar fix found in #62653.
What issues does this PR fix or reference?
Fixes: #43287
Reference: #61821
Previous Behavior
Assigned policies had to be templated using insecure grains or could only use the minion ID. You would have to live with insecure policy assignment or create a policy for each minion.
The pillar module only allowed to template paths with the minion ID. This necessitated a separate secret path for each minion, causing secret redundancy, or all minions to have access to all secrets defined in the static ext_pillar path.
New Behavior
Roles can be securely assigned in the pillar and used to template Vault policies. These pillar-sourced roles can also be used to template Vault ext_pillar paths, reducing redundancy/increasing security. It is sufficient to create a policy for each role.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Notes
The improvements in this PR are extended by #62684. It has a similar idea behind it, but represents a major rewrite to simplify further Vault integration. Noticeably, it allows to issue AppRoles and entities to minions and template their metadata using pillar values. This allows to push the ACL policy templating to the Vault side, reducing the amount of policy overhead further.