...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<bean id="ntlmProcessingFilter" class="org.acegisecurity.ui.ntlm.NtlmProcessingFilter"> <property name="defaultDomain"><value>DOMAINNAME</value></property> <property name="domainController"><value>172.16.0.30</value></property> <property name="authenticationEntryPoint" ref="ntlmEntryPoint"/> <property name="authenticationManager" ref="ntlmAuthenticationManager"/> <property name = "JCifsProperties"> <map> <entry key="jcifs.smb.client.username"> <value>username</value> </entry> <entry key="jcifs.smb.client.password"> <value>password</value> </entry> </map> </property> </bean> |
Selectively applying NTLM authentication
You can specify what IP addresses you want NTLM authentication to apply to, or not apply to, allowing you to support NTLM authentication for internal users and bypass it for external ones, for example (this prevents external users from being presented with a username/password dialogue box that they will probably not have valid values for).
To do this you need to replace the ntlmProcessingFilter, rather than using the org.acegisecurity.ui.ntlm.NtlmProcessingFilter
class you should use the org.acegisecurity.ui.ntlm.IPFilteredNtlmProcessingFilter
, this implementation of the NtlmProcessingFilter
can then be provided with additional configuration items specifying which IP addresses should/shouldn't be provided with the option to authenticate using NTLM.
Note |
---|
All the previous configuration items still apply, and should still be set, for the |
The new configuration items that the IPFilteredNtlmProcessingFilter
provides are excludedIpAddresses
and includedIpAddresses
, and are set as a list of IP addresses or address ranges.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<bean id="ntlmProcessingFilter" class="org.acegisecurity.ui.ntlm.NtlmProcessingFilter">
<property name="defaultDomain"><value>DOMAINNAME</value></property>
<property name="domainController"><value>172.16.0.30</value></property>
<property name="authenticationEntryPoint" ref="ntlmEntryPoint"/>
<property name="authenticationManager" ref="ntlmAuthenticationManager"/>
<property name="excludedIpAddresses">
<list>
<value>192.168.2.0/24</value>
<value>138.19.19.50</value>
</list>
</property>
<property name="includedIpAddresses">
<list>
<value>172.16.0.0/16</value>
</list>
</property>
</bean>
|
You don't need to provide both excludedIpAddresses
and includedIpAddresses
, in fact it's more than likely that you'll only want to provide one, either listing those addresses that should be NTLM authenticated, and everyone else isn't, or listing those addresses that should not be NTLM authenticated and everyone else should. But, if you do provide both then the exclude list is checked first. Also, if the include list is set then the IP address must appear in the list for NTLM authentication to be attempted.
Info |
---|
The IPFilteredNtlmProcessingFilter class is provided in version 1.0.7 or later of the |
Active Directory Groups
Information about what active directory groups a user belongs to can be used to provide role information to Weave for the users that are authenticated using Windows integrated authentication, removing the need to utilise the users.properties
file.
...