This is worthy of a post because this is without a doubt, the most convoluted packaging process for custom options on an app I’ve ever dealt with.
Gemalto makes many security tools, but in this case I just want to use their Safenet middleware drivers for macOS. This is supplied as a standard macOS pkg and will install just fine, but if you wish to customise the options then life suddenly starts being far less fun. The reason for this will become clear as you go through the administrator guide. Since this is licensed software, I won’t be posting a copy of anything infringing here.
First off, create a brand new blank macOS virtual machine and take a snapshot. You’ll thank me later if you have to redo any of this. Open up the .iso file that you got from Gemalto’s support portal and at time of writing this is version 10.1. It will look like this:
You should copy all of these folders to your new virtual machine. Inside the Installation folder is a .dmg file containing the smart card middleware installation pkg. You should install this on your virtual machine now.
Take the time to make sure your virtual machine’s usb settings have been downgraded to USB 2 only. There can be major system instabilities if you do not!
Ok driver installed, restarted once. Now we can proceed with customisation. You’ll want the administrator guide on one side from the Documentation folder, and the CustomInstallation folder on the other. This folder looks like this:
We need to leave most of this alone. Instead open up the CustomerConfiguration folder and with your favourite text editor open up both files inside here. Yes, this is where we configure things.
Now I have to stop and make a giant point here. This is a very unix way of doing things: all the configuration is in text files. Gemalto if you’re reading this, this isn’t a good way of doing things on a Mac. Look at reading standard macOS plist files / configuration profiles please. We’re increasingly configuring via MDM, please embrace this.
There’s two files. The first is called “SacLicense.lic” and this is where you put your customer license details. No screenshots this time, it should end up looking something like this:
Now it’s time to configure the other file “eToken.conf” and again it’s in the same format. Apologies for the large block of text that follows, but this shows every single option in it’s default setting. My advise to you would be to only include the lines you are changing from default, if only to keep the size of the file down to manageable limits.
AlertTitle=SafeNet Authentication Client
FutureAlertMessage=A certificate on your token expires in $EXPIRE_IN_DAYS days.
PastAlertMessage=Update your token now.
So what have we done here? We’ve created two files with all the customisation for the original package that we wanted. To get this in a form we can deal with, Gemalto has provided a script in the CustomInstallScript folder called “createSacCustomInstallation”.
Run that as a standard user, and it will not appear to do much. However a brand new .mpkg with your customisations will now appear in the Output folder.
This you must now take, and install AFTER the original Gemalto supplied pkg has installed. By the way, why did we have to install the drivers on this VM before? Well this custom package script won’t run without them. Not entirely sure why, but it’s a requirement.
As mentioned before, I cheerfully wasted a morning experimenting with this especially the eToken.conf file layout as the administration guide gives you a list of options but doesn’t tell you how to put them in the file! I do the hard work so you don’t have to.
The lack of a macOS compliant way of setting and reading preferences is problematic for me. Every time I need to make a change, I have to repackage and redeploy? I could do this via MDM and be done in half the time. Well, regardless it works for now but remember to keep an eye out as these options could change between release versions.
And finally after all this, this is the point where I find out that the ShowInTray=0 option doesn’t work …