Skip to content
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

Initial work on limiting what names an agent can register by the seliux context. #1023

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

alexlarsson
Copy link
Contributor

This extends how we configure allowed node names, and allows us to configure per-node-name requirements.

A node name can now either be in the allowed names list, or the controller config (or via a .d dropin) can have a section named "[agent FOO]", with a key Allowed=true.

If a named node is allowed, we look for the "RequiredSelinuxContext" key in the above section, and if it is set, we require the connecting agent to have the given selinux context type.

Note: We already disallow most processes (except bluechi_agent_t and haproxy_t) to connect to the controller, but with this we can limit what names they can claim. For example, we could enforce a special name for an agent running in qm.

This is very useful for arrays of strings for example.
This lists the sections in a config.
This will be needed for later use.
This is mainly doable for UDS sockets, but will allow us to limit
what name can register by the selinux label.
This extends how we configure allowed node names, and allows us to
configure per-node-name requirements.

A node name can now either be in the allowed names list, or the
controller config (or via a .d dropin) can have a section named
"[agent FOO]", with a key Allowed=true.

If a named node is allowed, we look for the "RequiredSelinuxContext"
key in the above section, and if it is set, we require the connecting
agent to have the given selinux context type.

Note: We already disallow most processes (except bluechi_agent_t and
haproxy_t) to connect to the controller, but with this we can limit
what names they can claim. For example, we could enforce a special
name for an agent running in qm.
@alexlarsson alexlarsson marked this pull request as draft January 10, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant