FR: Help the Keychain not Suck
I am well aware that this is not a desirable or fully accomplishable task.
With ADPassMon, we previously disabled the Mac's built-in Keychain sync ability (defaults write ~/Library/Preferences/com.apple.keychainaccess SyncLoginPassword -bool false
) so we could present the user with our own message via the application and update the keychain this way.
There are two problem's with Apple's current way of handling the Keychain not being in sync. The message has very small text and while it does explain that the user has to enter their old password in order to update the Keychain, the window that appears after clicking "Update the Keychain" does not reinforce this fact and since most people disregard this initial message in the first place, this causes problems.
There are a number of things I would like to see to help alleviate this problem:
- I would like NoMAD to automatically check on launch whether or not the user's Keychain password is in sync. This might interfere with the current implementation of the
UPCAlert
and/orSignInWindowOnLaunch
and as such priority for the Keychain would have to be established. In my experience if the Keychain is not in sync and the user goes through theUPCAlert
Sign-In process, NoMAD will get stuck and stop responding (I'm going to make this a separate issue).
- One of the challenges when the user's Keychain is not in sync, is that messages that are configured to appear in the middle of the window fall secondary to any application prompts that might also appear. So even in the case of ADPassMon, you would have to move the OS's Keychain prompt(s) in order to access the application's generated Keychain message.
- When the user's Keychain is not in sync, present a prompt with a default message or one specified via NoMAD preferences (
KeychainSyncMessage
) and have this appear immediately below the NoMAD menu item at the top in order to get around the issue mentioned above. In this message I'm looking to accomplish the following:
- Message that quickly tells the user what the problem is (or custom message) with a single "Fix Keychain" button.
- Clicking "Fix Keychain" would open a second window, much like the existing Change Password window, albeit for the Keychain with two buttons to allow the user to either "Update Keychain" or "Create New Keychain".
- The Update Keychain button would only be accessible after entering their old password and new & verify password.
- The Create New Keychain button would always be available (but not the default button) so users would have to manually choose to start from scratch.
- The following possible actions would occur based on the information the user entered:
- Selects Update Keychain - If their current password was incorrect (aka did not unlock the keychain), present a message indicating this and suggest creating a new keychain if they don't remember.
- Selects Update Keychain - If their new / verify password were incorrect, present a message indicating this.
- Selects Update Keychain - If their new / verify password did not match, present a message indicating this.
- Selects Update Keychain - If all was correct, unlock and update user's Keychain password and present a message indicating if this completed successfully. Make a note that you will likely need to click "Cancel" on any existing Keychain related messages.
- Selects Create New Keychain - present window informing the user that any of their previously saved passwords on the machine will be gone and force the user to confirm this: two buttons "Update Keychain" and "Cancel". If verified, create new Keychain for user and inform them of the successful creation of the new Keychain
- Lastly, if possible, make the possible results & messages for some of the described actions above into their own preferences:
KeychainNotInSyncMessage
KeychainSyncUpdateSuccessMessage
KeychainSyncUpdateFailMessage
KeychainSyncCreateNewVerifyMessage
Just to be clear, this is "perfect world" for me. I would love other ideas to fix a problem that I know has long been an issue for Mac Admins.