Safari keeps asking permission to access the keychain

Yes, if you press Always Allow would put it back to it's default behaviour otherwise it will ask you to access the Keychain each time. By pressing Allow you tell the security system to allow Safari to access it once and only once, if you say Always Allow you say it can access it from now on until it is updated again. (Developers have an option to avoid this issue by signing their applications)


You have two potential problems. The first is that your default keychain is no longer set to "login". Open up Keychain Access (/Applications/Utilities/Keychain Access.app), select the login keychain, and choose File » Make Keychain "login" Default.

The second potential problem is a damaged keychain. In Keychain Access, still with the login keychain selected, choose Keychain Access » Keychain First Aid. Enter your password and hit repair.


Though given your description I doubt it's the case, but maybe the digital signature of Safari itself is broken? You can test it using:

codesign --verify --verbose /Applications/Safari.app

...which should give you:

/Applications/Safari.app: valid on disk
/Applications/Safari.app: satisfies its Designated Requirement

(And if indeed it's broken, then see If Mac code signing is tampered with, what might fail?)


I've had about the same problem and it has everything to do with Code Signing. There are complex ways to change the Safari code signing, so take the easy way: just put you Safari application in the trash can and copy the complete (working) Safari application from another Mac (with the same version number) to yours.

Keychain Access will ask you for permission. Choose "always" and you're problem is fixed!

It did the trick for me after Googling and troubleshooting for hours...