twocanoes / xcreds

Open Source Project for Syncing IdP password with macOS login password
BSD 3-Clause "New" or "Revised" License
223 stars 25 forks source link

XCreds breaking Munki's logout/install @loginscreen logic #102

Closed mariuslangz closed 9 months ago

mariuslangz commented 1 year ago

Hi!

After deploying XCreds to parts of our internal and customers fleet we are experiencing some issues with packages which needs a reboot or logout to install..

It seems to me that when we start an update through Munki which needs a restart the installation window pops up for a second or two, before it disappears because XCreds is launched..

Is there any way for you to make XCreds check if Munki's logout logic is running and wait to launch XCreds until it's finished?

twocanoes commented 1 year ago

How about if i delay showing until a file is created or removed? Is there a munki run file that I could monitor?

mariuslangz commented 1 year ago

Munki creates a file indeed when a logout to install is needed!

You can therefore delay based upon if this file exists: /private/tmp/com.googlecode.munki.installatlogout

mariuslangz commented 1 year ago

Do you have any timeline on this? We have paid for 500 licenses and would very much like to have this issue resolved soon!

twocanoes commented 1 year ago

Sorry for the delay! I am on it.

tim

mariuslangz commented 1 year ago

Is there any timeline on when we can have an updated version of XCreds with this fix included?

twocanoes commented 1 year ago

OK, looking at this issue, I coded up a fix. However, if XCreds window doesn't show, it is just a blank window with the background, which seems to imply the mac is locked up (which it isn't). I could hide the background window, but then it would just show grey. I suspect the issue is that munki is starting up before xcreds and then xcreds covers it. I could reduce the window level, but I suspect that won't help either.

Update: I just installed munki and turned off xcreds. When I touch the file :

touch /private/tmp/com.googlecode.munki.installatlogout

It shows the progress for a few seconds then disappears. I suspect this issue may be unrelated to xcreds. Can you verify that if xcreds isn't installed, munki works correctly?

mariuslangz commented 1 year ago

Well, you need to have a pending update which needs to be installed in order for Munki to actually do anything at the loginwindow when the file is present. Else it will just close as you mention.

Is it possible for you to give me an .pkg installer with the changes implemented so I can test from my end?

mariuslangz commented 12 months ago

@twocanoes Any updates regarding this?

twocanoes commented 10 months ago

i need a way to replicate this. any idea how?

mariuslangz commented 10 months ago

@twocanoes Did you succeed in replicating the issue? It is inefficient for us to run the xcreds_login.sh -r manually before installing software which needs to be installed at the loginwindow, then do xcreds_login.sh -i afterwards..

Should suffice to have Munki trying to install e.g Office suite with the RequireLogout option enabled on the packages.

twocanoes commented 9 months ago

Create a new key hideIfPathExists that should contain a path to a file. if a file or folder exists, then the UI will hide until it is removed. Checks every 5 seconds.