Make __pub_id available in custom runners called via the peer interface #67497
Replies: 2 comments
-
|
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. |
Beta Was this translation helpful? Give feedback.
-
|
For the record, a workaround for this issue can be found in the Lines 60 to 66 in b7f9c2f Lines 24 to 52 in b7f9c2f Lines 181 to 198 in b7f9c2f |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
I'm looking to create a runner that signs x509 certs for minions. The minions will use the peer runner interface to request certs from the master. The flow for this involves calling an external API that does the signing, so the existing x509 state won't work because it requires access to a signing cert.
The master will render the minion's pillar to determine if its authorized to get the cert it requested. This means the custom runner needs to know who called it. So far I haven't found a way to get this information.
Describe the solution you'd like
Looking through the x509 module, I found that Salt populates **kwargs with information about who made the call:
https://github.com/saltstack/salt/blob/master/salt/modules/x509.py#L1047
It'd be nice if the same could be done inside a custom runner: add "**kwargs" to the runner function's signature, and Salt places __pub_id into it.
Describe alternatives you've considered
I've considered implementing this as an execution module, however I'd explicitly like to run this on the master, so using a runner seems like a better way to call this out.
Beta Was this translation helpful? Give feedback.
All reactions