Enable NTLM for other browser in Liferay 6.1

4 comments

Integration of NTLM is supported with only Internet Explorer due to security issues.
To enable NTLM for other browsers, follow below instruction make necessary changes in NTLMFilter.java

Below is OOB code


Before Authentication liferay will perform check whether NTLM is enabled or not and also checks whether current browser is IE only.
So in case if you try to access site with browser other then IE in that case you will see login screen and user will not be authenticated automatically.


So just to enable NTLM with other browser you have to override  isFilterEnabled() method.
Remove check for IE and the updated code will be like this .


About BrowserSnifferUtil
BrowserSnifferUtil is one of the good API which can help you to detect your current browser and operating system based on user agent.

BrowserSnifferUtil.getBrowserId(httpRequest)
Abvoe method will return string . If you current browser is Internet Explorer then this method will return ie .
If your current browser is FireFox then it will return firefox and for remaining browser it will return other.


BrowserSnifferUtil.isIe(httpRequest) will retuen true if your current browser is IE. There are other methods in this util to check for Mozila , chrome , safari etc.

You can also check your current operating system using this util.
like isWindows(httpRequest) method will check if current operating system is windows or not.



Next PostNewer Post Previous PostOlder Post Home

4 comments:

  1. I'm extremely new at Liferay (installed it yesterday) and I have no Java development experience. I can't find an NTLMFilter.java file anywhere. Where is this code?

    ReplyDelete
  2. Hi Jitendra,

    in previous version of liferay (for example 6.0), there is no check in the code if the browser is IE.
    http://docs.liferay.com/portal/6.1/javadocs-all/src html/com/liferay/portal/servlet/filters/sso/ntlm/NtlmFilter.html

    You'll notice that on the processFilter method, it only check:
    if (LDAPSettingsUtil.isNtlmEnabled(companyId))

    Does it mean that on this version (6.0), NTLM is supposed to be working on FF and Chrome for Liferay? (If all the other configurations are ok)

    ReplyDelete
    Replies
    1. First of all sorry for late replay. As per my knowledge before LR 6.1 NTLM was enabled for all the browser. But due to some security issue they disabled NTLM in non IE browser. You can check below LPS for more information. http://issues.liferay.com/browse/LPS-15559

      Thank You
      Jitendra

      Delete