D4Science Portal HTTPS x509 Certificate Authentication

From Gcube Wiki
Jump to: navigation, search

This is a custom Auto login hook that provides customised authentication for X509 certificate users. Set the dev/deploy environment

  1. Unzip the file [1] onto your "plugin-sdk/hooks" folder.
  2. Copy the AutoLoginCustom.java source to the src folder
  3. Add the following line to portal.properties file:

auto.login.hooks=com.liferay.portal.security.auth.BasicAuthHeaderAutoLogin,com.liferay.portal.security.auth.AutoLoginCustom

  1. Run "ant war" - The war file will be created in the plugins-sdk/dist folder.
  2. Copy the war file to Liferay_home/deploy
  3. Restart liferay instance

Auto Login hook is now ready to be tested and used.

Configuration needed at liferay Web UI:

  1. The X509 User should have "Job Title" field configured to the X509 certificate DN

The field "Job Title" was chosen, because the field length is long enough to hold X509 certificate DN unlike other fields. This feature can be changed to use custom attribute field as per needs and requirements.