-
Notifications
You must be signed in to change notification settings - Fork 499
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
systemd attestor, additional selectors for template and instance names #5874
Comments
@kfox1111 Are you interested in these template and instance selectors because you want to select on one, but not the other? Or are you mostly interested in differentiating when a systemd unit is templatized vs. not? I'm curious to learn more about the use case since it looks like these selectors duplicate the information in the existing ID selector. |
For my own use, I want to match on the template rather then a specific instance. so match all foo@service. |
Got it. Do you need the instance selector? It seems like otherwise duplicate information to what is in the id selector. Do you have any idea how we can produce this template selector? |
hmm... I could live without it. Just thought more selectors were better then not. I believe they all have an @ in their name. So if the ID has an @, slice off any characters between the first @ and the last '.' and use that as the template name? |
Looks like the interface provided by systemd through dbus doesn't have a field for the template name, but it has one for the fragment path:
Looking at the systemd attestor, we already emit the fragment path as a selector. @kfox1111 does this selector work for your needs? |
Hmm... the same service could be managed via /usr/lib/systemd/system/[email protected] or /etc/systemd/system/[email protected], which is a little awkward, so may need two entries in some cases, but I think I can use that for now. Maybe we make a selector for fragment, without the path in the name, for just the filepath.Base of fragment_path? |
Maybe, but we should also think about the security properties that the selector provides. I'm thinking about the fact that systemd also supports user services so you would want to know if I'll see if I can find some more documentation about how |
Currently supported selctors:
It seems like ID includes the instance name in the case its templated. For example, if the template is [email protected] and the instance started [email protected], the selector is
systemd:id:[email protected]
. This is a useful selector.It would be useful too though, to have the values:
[email protected]
andbar
available as selectors. Maybe we add the selectors:The text was updated successfully, but these errors were encountered: