Tuesday, July 22, 2014

Automatically select client certificate by Chrome on Mac

Two steps are required to automatically select client certificate without user interaction.
1. trust the certificate:
open keychain utility and select the client certificate, open the certificate detail by double click it. Open trust section,  in "When using this certificate" dropdown list box, select "Always trust"

2. automatically pick the certificate
create or edit file "/Library/Preferences/com.google.Chrome.plist" and insert code similar to below sample code to match the client certificate information based on the host url pattern information:

<plist version="1.0">
<dict>
  <key>AutoSelectCertificateForUrls</key>
   <array>
     <string>{"pattern":"[*.]sap.corp","filter":{"ISSUER":{"CN":"SSO_CA"}}}</string>
     <string>{"pattern":"[*.]sap.com","filter":{"ISSUER":{"CN":"SSO_CA"}}}</string>
     <string>{"pattern":"[*.]sap-ag.de","filter":{"ISSUER":{"CN":"SSO_CA"}}}</string>
   </array>
</dict>
</plist>

No comments:

Post a Comment