saltstack / saltstack/salt

Salt-api should allow to prevent all events to be publicly exposed to all users at /events and /ws endpoints

Open
#59,056 1 comment 0 reactions 1 assignee View on GitHub

@dwoz is already working on this.

Since Dec 1, 2020.

Feature pending-discussion
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Is your feature request related to a problem? Please describe.
I was surprised to notice that regardless of their ACL, any user connected to the salt API could watch any event that is published on the event bus using "/events" or "/ws" endpoints.
On the documentation, I can see this warning: "All users that have external authentication privileges are allowed to run saltutil.findjob. Be aware that this could inadvertently expose some data such as minion IDs."
But the reality is much more intrusive as all users that have external authentication privileges are actually allowed to see all data going through the event bus.
So they can see the result of any job (for example, pillar.items would expose all sensitive data of a minion) that come from any minion (even if their ACL do not give any right to this user for the given minion).

Describe the solution you'd like
I'd like to be able to configure which kind of events a user is allowed to watch, may be using existing external auth ACL system.
For example I would like a user to be able to only see events that match minions that the user is able to control.

It would also be a good thing to be able to completely disable the "/events" and "/ws" salt-api endpoints to avoid to leak any sensitive data to salt-api users.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.