Hello Chawk,
Thank you for your reply.
I am not that afraid of an foreign IP, contacting the salt ports. In the end, iptables will only allow connections from our own systems. Although this additional configuration hastle would not be necessary, if the connection would be established in the opposite direction.
Our environment is just huge and very heterogeneous. Ransomware groups (and other attackers with some brain) will infect your network and just wait. You wont notice them at first. Once on a minion, the attacker can see the masters port in the minions config and can access the master.
Salt is single system, capable of destroying your/our entire infrastructure within mere seconds. An attacker waiting on a minion, for the next security vulnerability on the master, is my biggest nightmare. And this is their typical behavior with the MS ActiveDirectory, already.
If the connection would be established in the other direction, the salt master could be hardened a lot more. You could even block *all* incoming connections, if the admin can access the master locally.
I was able to get salt-ssh running a tiny bit better. "ssh_ext_alternatives" is completely useless, once you are using "onedir" installations on the master. They all ship with the same python version at the moment.
AlmaLinux/RHEL 8 provides a python3.11 package, you can install additionally. Add "set_path: '$PATH:/opt/salt-ssh/bin/' to the roster for the affected minions and place a symlink called "python3" in that directory on the minion.
Debian 12 is using a compatible python. However: Debian 11 is too old, already.
ArchLinux will not be working. I guess, it does not have a "backports" module, as it is using the latest python version.
Alpine Linux 3.16 up to 3.20 use a compatible python-version. But Alpine Edge is affected by the same issue as ArchLinux.
Thats with Salt 3006. Still not a great situation. :(
Any ideas on improving this, are very welcome.
Best regards
Steffen