tchen_1 Posted May 31, 2018 Share Posted May 31, 2018 I created a user with username tokenUser and I want to be able to authenticate him with just his username; that is, I want the URL "http://localhost:8080/jasperserver?pp=u=tokenUser" to log him in.I edited the sample-applicationContext-externalAuth-preAuth xml file so that the preAuthenticatedManager bean looks like:<bean id="preAuthenticatedManager" class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.JSProviderManager"> <property name="providers"> <list> <!-- This bean calls upon preAuthenticatedUserDetailsService to create user details based on a token extracted from request by proxyPreAuthenticatedProcessingFilter --> <bean class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.preauth.JSPreAuthenticatedAuthenticationProvider"> <property name="preAuthenticatedUserDetailsService"> <bean class="com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService"> <!-- Token format configuration example for token: u=obama|r=PRESIDENT,HUSBAND|pa1=USA,Kenya|pa2=Washington --> <property name="tokenPairSeparator" value="|"/> <property name="tokenFormatMapping"> <map> <entry key="username" value="u" /> </map> </property> <property name="tokenExpireTimestampFormat" value="yyyyMMddHHmmssZ"/> </bean> </property> </bean> </list> </property> </bean>I did not edit anything else in the xml file. Then I renamed it as applicationContext-externalAuth-preAuth and put it in "C:Jaspersoftjasperreports-server-cp-7.1.0apache-tomcatwebappsjasperserverWEB-INF".After restarting JasperServer, the URL "http://localhost:8080/jasperserver?pp=u=tokenUser" gives me a 404 error. I also tried "http://localhost:8080/jasperserver?pp=u%3DtokenUser" and "http://localhost:8080/jasperserver?pp%3Du%3DtokenUser" and also simply "http://localhost:8080/jasperserver"; they all give me the 404 error. I also tried tokens with the default users that come with JasperServer and they also don't work.As soon as I delete the preAuth xml file in WEB-INF and restart the server, everything works again (no 404 when I navigate to "http://localhost:8080/jasperserver").Any ideas? Link to comment Share on other sites More sharing options...
john_71 Posted March 26, 2019 Share Posted March 26, 2019 I am getting this exact error. Did you ever figure out the cause of this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now