It is not secure to authenticate an application using plain username and password. Many applications started supporting certificate based authentication than basic (username + password) authentication.
What is Certificate based authentication?
Certificate based authentication uses a digital certificate to identify a device, user and provide access to resources. Usually this digital certificate is issued by a certificate authority, it contains information like
a. certificate expiry date
b. Certificate authority that issued this certificate
c. Name of the client etc.,
While doing certificate authentication, client has to submit the certificate to the server, server validate the authenticity of the certificate and provide access to the client, if the certificate is valid.
How to load client certificates from Windows Operating system?
The Windows-MY keystore contains the user's private keys and the associated certificate chains.
How to load client certificates from MAC Operating system?
By loading the certificates from key store 'KEYCHAINSTORE', we can load the client certificates from MAC Operating system.
I developed an application 'SystemCertificateLoader.java', it provides following utility methods to load client certificates from windows and mac operating system.
public static List<Certificate> loadClientCertificatesFromWindowsOperatingSystem()
Load client certificates from windows operating system.
public static List<Certificate> loadClientCertificatesFromMacOperatingSystem()
Load client certificates from MAC operating system.
public static List<X509Certificate> getCertificates(List<Certificate> certificates)
Get all the list of X509Certificate from list of certificates.
Find the following complete working application.
You may like