External database authentication in JasperServer 5.1

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Hello

For the past week I've been struggling to log in using credentials stored in an external database. I have modified and deployed the sample applicationContext-externalAuth-db.xml, as mentioned in the jasperreportsserver-auth-cookbook, but when i try to log in, i get a bad credentials exception. Do you have any suggestion on how to get the external database authentication working ? 

I have to mention that the password is stored as plain text in my external database.

Thank you,

Daniel.

dcristea's picture
Joined: Jun 25 2013 - 5:32am
Last seen: 8 years 9 months ago

1 Answer:

If you are using plaintext, remove the reference to the passwordValidator bean in externalDaoAuthenticationProvider:

<bean id="externalDaoAuthenticationProvider" class="com.jaspersoft.jasperserver.multipleTenancy.security.externalAuth.db.MTExternalDaoAuthenticationProvider">
        <property name="userDetailsService"><ref local="externalUserTenantDetailsService"/></property>
        <property name="passwordValidator"><ref local="passwordValidator"/></property>
    </bean>

This example is from a pro file - the class might be slightly different in community. So make sure to edit your file & not copy this.

 

elizam's picture
10875
Joined: Mar 5 2012 - 9:19am
Last seen: 1 year 11 months ago

Thank you for your reply. It seems like the root of my problem was an issue with the authoritiesByUsernameQuery. I would like to ask you if there is any way for me to see the "usersByUsernameQuery" and the "authoritiesByUsernameQuery" queries in the jasperserver log.

dcristea - 8 years 10 months ago

Just saw this - you can enable additional logging as described here:
http://community.jaspersoft.com/documentation/jasperreports-server-authe...

elizam - 8 years 5 months ago
Feedback