It took me a little bit to wrap my head around the XPC code, but I have the basis of it working now. I started a new project from the ground up. Will re-use a lot of the code from the previous iteration once I get the basic requirements in place.
I gave up trying to generate a self signed certificate and RSA private key with the command line. I left that in the GUI, since it was easy to integrate the RSA Framework there.
The command line tool can import the generated p12 handed off by the GUI app into the system keychain or a p12 generated somewhere else. Alternately it can also import a secret key handed off from the GUI app to use for the Entra ID authentication. The Entra ID token is retrieved and cached in the daemon for re-use while it is still running.
The daemon plist I used this key:
<key>EnablePressuredExit</key>
<true/>
Which seems to work well. I have a heartbeat pinging the daemon every 60 seconds while the GUI app is running to keep the daemon running. Maybe I don't need to do that? Is there a better way?
There will be a second plist to launch the daemon on a schedule to do the sync tasks, once I get there in the coding. 😁
That's where I'm at now on this. It's working well so far. Thanks so much for the hand holding at pointers to get me going. Really appreciate it!
Topic:
Privacy & Security
SubTopic:
General
Tags: