Søren Grønning
unread,Mar 7, 2026, 8:14:20 AM (5 days ago) Mar 7Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to munki-dev
Hi all,
At work, we use client certificates with Munki (currently version 6.x, moving to 7.x as we get our Pyhton act together 😅) and have done so for years. We have ~1800 Macs enrolled with Jamf Pro and all have some sort of an ADCS issued client certificate (be that user or host certificates) which we use for such purposes as network authentication and access to our Munki repo.
We're using Jamf Pro and Jamfs ADCS Connector to tie the two together and it works well. However, there are circumstances causing a client certificate to be renewed in time, but not removed from the keychain. This is no problem with 802.1x authentication, due to the way it references the certificate within the .mobileconfig.
But, with Munki this causes issues, due to the fact that Munki currently searches only for the first certificate to match the server's sent criteria for a match (e.g. a specific issuer) and Munki is then unaware of the expiration date of a matched certificate, which in our case causes Munki to stall at the oldest [expired] certificate without trying to work out if there's in fact a newer valid certificate to hand over to the HTTPS server at the other end instead. This of course is an issue concerning access to the Munki repo.
I've taken some time to look at the Swift code for the current 7.x branch and put together a small fix for this issue. It comes in form of a function used to check certificate expiry and a call to this function within the for identityRef in identityRefs as! [SecIdentity] loop of the clientcerts.swift file.
In my tests, it does everything as intended and there have been no signs of regression as a result of introducing the code.
Attached is my clientcerts.swift file with all additions and I hope that someone on the Munki Dev list would be able to test it in their own environment and confirm that it is both working and causes no regression.
Best regards,
Søren Grønning