tammclaughlin Posted October 15, 2008 Share Posted October 15, 2008 Hello,I have searched the forum on help for the above problem and despite coming across many posts with different suggestions, I still cannot by-pass the authentication so seeking help.I am using jasperserver 3.0.0 with the ireport plugin v 3.0.0. We have reports that generate pdf's and stored in a repository called: ContentFilesThe url to access an example report is:http://myserver:8080/jasperserver/fileview/fileview/ContentFiles/pdf/uk4628_003_lot_schedule_hot_technology.pdf I wish to bypass the login authentication for viewing reports and have made the following changes with no sucess: 1. Assigned ROLE_ANONYMOUS read permissions in the folder ContentFiles and pdf from the gui2. Edited applicationContent-security.xml as follows: edit 1: <bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"> ....... ....... /flow.html=ROLE_USER,ROLE_ANONYMOUS /viewreport.html=ROLE_USER,ROLE_ANONYMOUS /fillparams.html=ROLE_USER,ROLE_ANONYMOUS /fileview/**=ROLE_USER,ROLE_ANONYMOUS /reportimage/**=ROLE_USER,ROLE_ADMINISTRATOR edit 2: <bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter"> <property name="key"><value>foobar</value></property> <!-- <property name="userAttribute"><value>anonymousUser,ROLE_ANONYMOUS</value></property> --> <property name="userAttribute"><value>anonymousUser,ROLE_USER</value></property> </bean> edit 3: <bean id="flowVoter" class="com.jaspersoft.jasperserver.war.security.FlowRoleAccessVoter"> <property name="flowAccessAttribute" value="FLOW_ACCESS"/> <property name="flowDefinitionSource"> <value> *=ROLE_USER,ROLE_ADMINISTRATOR,ROLE_ANONYMOUS </value> Is there anything that I am missing?Can anyone offer any suggestions?Thanks.Tam Link to comment Share on other sites More sharing options...
halfer Posted October 24, 2008 Share Posted October 24, 2008 I have not used the internals of JasperServer in this way, so can't offer direct advice on that. But I've used the SOAP API a fair bit and it works very well indeed. If you get stuck on this question, you could always implement an interface in a web language of your choice, which will of course generate your reports with as much or as little authentication as you want. Link to comment Share on other sites More sharing options...
mmflynn Posted October 27, 2008 Share Posted October 27, 2008 Hopefully this will work for you. All I did was: (1) Login as admin. Assign "read only" privileges to ROLE_ANONYMOUS to the appropriate files/folders. (2) Edit applicationContent-security.xml:Add following line to <bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"> section:/fileview/personalfolders/demo/**=ROLE_ANONYMOUS (3) Restart JasperServer. (4) Try the url. In my case, it was: http://localhost:8080/jasperserver-pro/fileview/fileview/PersonalFolders/demo/SugarOpportunities.pdf. Good luck!Mary Link to comment Share on other sites More sharing options...
tammclaughlin Posted October 29, 2008 Author Share Posted October 29, 2008 mmflynnWrote: (1) Login as admin. Assign "read only" privileges to ROLE_ANONYMOUS to the appropriate files/folders. (2) Edit applicationContent-security.xml: Add following line to <bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"> section: /fileview/personalfolders/demo/**=ROLE_ANONYMOUS (4) Try the url. In my case, it was: http://localhost:8080/jasperserver-pro/fileview/fileview/PersonalFolders/demo/SugarOpportunities.pdf. Thanks for your reply.However, this did not work and jasper filed to start.(1) I can see from the admin view that I have the following folders: root -> content files -> pdf. I am not sure if content files existed by default or created by the admin user(2) You have PersonalFolders in your URL but personalfolders in your xml file. Is this just a typo? I am sure I tried it with both anyway.(3) I have the read only permissions on the folder.(4) I tried editing the xml file above with keeping /fileview/**=ROLE_ANONYMOUS,ROLE_USER,ROLE_ADMINISTRATOR and adding /fileview/ContentFiles/pdf/**=ROLE_ANONYMOUS and just the /fileview/ContentFiles/pdf/**=ROLE_ANONYMOUS line on it's own, both with no sucess. Jasper does not start for some reason and the logs do not seem to give much away. Link to comment Share on other sites More sharing options...
tammclaughlin Posted October 29, 2008 Author Share Posted October 29, 2008 Ok, just checked all the logs and I can see an error relating to converting to lower case. This now makes sense so I may be onto the problem! Link to comment Share on other sites More sharing options...
lasinir Posted August 24, 2009 Share Posted August 24, 2009 Thanks! This helped a lot. I was trying to get direct anonymous access to a Dashboard web page (scheduled refreshing 15 minutes).I am using JasperServer Communtity Edition version 3.5.0 (with 3.5.3 jasperreports.jar). Link to comment Share on other sites More sharing options...
tamtomo_2 Posted November 6, 2019 Share Posted November 6, 2019 No longer valid for latest jasper report..This one works though : https://community.jaspersoft.com/wiki/allow-anonymous-access-reports 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