-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG]External Auth with Syndic not Working as Expected #62618
Comments
@waynew Isn't this something you looked at recently? |
Just dropping an update here in addition to discussions I've had behind the scenes. This title is probably a bit of a red herring. eauth actually is working exactly as it should. The larger problem is that syndic targeting is maybe kind of broken? CVE-2022-22941 was recently fixed in Salt - prior to that fix, Salt would see an empty list of valid minions and publish that event anyway. So given the example, That was fixed. However, currently the MoM doesn't retain any information about any of the syndic's minions, and AFAICT there's not any mechanism in place to allow the MoM to publish a request to the syndics to ask them for matching minions. Given Salt's powerful targeting capabilities, that's probably what should happen. In other words:
That should solve this issue. |
I have something that... might work. Horribly. But it might work. Try this - create a python script:
Then run it with your salt's Python:
Now based on my very limited testing you should be able to run your command. Though you'll have to run with a compound matcher:
In my local testing it's not actually returning for some reason -- i.e. that never comes back, but if I run async and then So... it's a horrible workaround but it might be good enough 🤞 |
@waynew Thanks for looking. I will try this. Does this confirm that this is a "will not fix" type issue then? |
Well, we do want to provide a fix, but it won't happen for the bug fix, due to the scope of the required fix 😥 We do plan to fix it for the 3006 release. |
When is the 3006 release planned? This is a major issue for us, still. |
Fixed by #63382 @cmacnevin we're nearly to RC1 for 3006, I don't know if we have a firm date for when we're going to release RC1, but 3006 is planned to be our first LTS release, so definitely please keep your eye out for that and test it as soon as possible! |
Description
There appears to be an issue when attempting to target minions from a MoM with external authentication configured. When I use an external authentication configuration like this example, it all works great.
However, as soon as I try to l limit the target and use
salt -a pam
to authenticate and run the command I get an authentication failure.Here is the error that I see from the CLI:
I am attaching logs for further investigation of this issue that appears to be a bug with Syndic. When I try to do this directly from the master that is connected to the Salt minion, the authentication works as expected.
Setup
MoM -> Syndic master -> minion
These are all fresh VM's deployed via Salt Cloud running Salt 3004.2.
Steps to Reproduce the behavior
Add a user
saltdev
to your Master of Masters and configure the password for this user.The above configuration should work when running a command with
salt -a pam
for authentication. Then update the configuration to be like the following and restart your master of masters:Expected behavior
I would expect that the user is able to target the intended minion, however, I am not able to run any commands against any minion with this configuration.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Please see the attached logs for more information.
logs.tar.gz
The text was updated successfully, but these errors were encountered: