Note that there are some explanatory texts on larger screens.

plurals
  1. POJasperReports Server 5.2 Active Directory Integration
    primarykey
    data
    text
    <p>Apologies for yet another AD integration question :)</p> <p>I've got a fresh install of JasperReports Server 5.2 on Windows Server 2008 R2 and I'm trying to configure AD authentication but logins always fail.</p> <p>I've copied the sample applicationContext-externalAuth-LDAP.xml file into the WEB-INF folder and customised it:</p> <pre><code> &lt;bean id="ldapAuthenticationProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider"&gt; &lt;constructor-arg&gt; &lt;bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator"&gt; &lt;constructor-arg&gt;&lt;ref local="ldapContextSource"/&gt;&lt;/constructor-arg&gt; &lt;property name="userSearch" ref="userSearch"/&gt; &lt;/bean&gt; &lt;/constructor-arg&gt; &lt;constructor-arg&gt; &lt;bean class="org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator"&gt; &lt;constructor-arg index="0"&gt;&lt;ref local="ldapContextSource"/&gt;&lt;/constructor-arg&gt; &lt;constructor-arg index="1"&gt;&lt;value&gt;&lt;/value&gt;&lt;/constructor-arg&gt; &lt;property name="groupRoleAttribute" value="cn"/&gt; &lt;property name="groupSearchFilter" value="((member={0})(objectClass=group))"/&gt; &lt;property name="searchSubtree" value="true"/&gt; &lt;!-- Can setup additional external default roles here &lt;property name="defaultRole" value="LDAP"/&gt; --&gt; &lt;/bean&gt; &lt;/constructor-arg&gt; &lt;/bean&gt; &lt;bean id="userSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch"&gt; &lt;constructor-arg index="0"&gt; &lt;value&gt;&lt;/value&gt; &lt;/constructor-arg&gt; &lt;constructor-arg index="1"&gt; &lt;value&gt;((sAMAccountName={0})(objectClass=user))&lt;/value&gt; &lt;/constructor-arg&gt; &lt;constructor-arg index="2"&gt; &lt;ref local="ldapContextSource" /&gt; &lt;/constructor-arg&gt; &lt;property name="searchSubtree"&gt; &lt;value&gt;true&lt;/value&gt; &lt;/property&gt; &lt;/bean&gt; &lt;bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource"&gt; &lt;constructor-arg value="ldap://hostname:389/dc=domain,dc=local"/&gt; &lt;!-- manager user name and password (may not be needed) --&gt; &lt;property name="userDn" value="Administrator"/&gt; &lt;property name="password" value="password"/&gt; &lt;/bean&gt; </code></pre> <p>Actual Hostname, Domain name and Password have been removed in the above, our AD is set up a bit strangely in that users are spread across several OUs so I've left the branch DN properties empty and attempted to limit the search to entries with a certain objectClass (user or group).</p> <p>I've enabled debug level logging for&nbsp;org.springframework.security and&nbsp;com.jaspersoft.jasperserver.api.security but I'm not getting anything particularly informative in the logs:</p> <pre><code> 2013-09-03 10:12:32,882 DEBUG BaseAuthenticationProcessingFilter,http-bio-80-exec-6:252 - Request is to process authentication 2013-09-03 10:12:32,884 DEBUG ProviderManager,http-bio-80-exec-6:183 - Authentication attempt using org.springframework.security.providers.ldap.LdapAuthenticationProvider 2013-09-03 10:12:32,888 DEBUG FilterBasedLdapUserSearch,http-bio-80-exec-6:109 - Searching for user 'username', with user search [ searchFilter: '((sAMAccountName={0})(objectClass=user))', searchBase: '', scope: subtree, searchTimeLimit: 0, derefLinkFlag: false ] 2013-09-03 10:12:32,905 DEBUG SpringSecurityLdapTemplate,http-bio-80-exec-6:197 - Searching for entry in under DN 'dc=domain,dc=local', base = '', filter = '((sAMAccountName={0})(objectClass=user))' 2013-09-03 10:12:32,933 DEBUG ProviderManager,http-bio-80-exec-6:183 - Authentication attempt using com.jaspersoft.jasperserver.api.security.internalAuth.InternalDaoAuthenticationProvider 2013-09-03 10:12:32,940 WARN LoggerListener,http-bio-80-exec-6:60 - Authentication event AuthenticationFailureBadCredentialsEvent: username; details: org.springframework.security.ui.WebAuthenticationDetails@21a2c: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: F8EA36A4CF952E3DE41E7211B4EB529D; exception: Bad credentials 2013-09-03 10:12:32,941 DEBUG BaseAuthenticationProcessingFilter,http-bio-80-exec-6:406 - Updated SecurityContextHolder to contain null Authentication 2013-09-03 10:12:32,941 DEBUG BaseAuthenticationProcessingFilter,http-bio-80-exec-6:412 - Authentication request failed: org.springframework.security.BadCredentialsException: Bad credentials 2013-09-03 10:12:32,943 DEBUG HttpSessionContextIntegrationFilter,http-bio-80-exec-6:255 - SecurityContextHolder now cleared, as request processing completed</code></pre> <p>Any suggestions gratefully received, I've played around with the settings in the externalAuth XML file but nothing seems to make a difference to the log or the login failures.</p> <p>Cheers, Matt</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload