SSO Pre-auth with visualize

0

In our embedded app we are trying to use the pre-auth token to sync users from our app to the jasperserver-pro we are running in AWS (version 6.0.1). I got it working in the java controllers using the rest client however I'm having trouble getting it to work with visualize. Visualize works completely fine with username:password authentication but when I change it out with the pre-auth token (they have an example in the visualize docs that I am following) it doesn't return. I watched the network logs and it goes to <jasperserver-pro>/xdm.htm then to <jasperserver-pro>/login.htm then a couple redirects and eventually hits <jasperserver-pro>/?pp=<token> and then just hangs. I looked at the server's response and it looks like it is a redirect to the home page. Has anyone gotten pre-auth sso working with visualize and if so did you see this problem or any other problems?

 

srang's picture
206
Joined: Oct 28 2014 - 11:52am
Last seen: 3 years 1 month ago

So I think this has something to do with how jasper is managing a visualize session because when I restart the server, the auth token works the first time but if I try refreshing the page I'm doing the auth, it hangs. Also I've tried sending tokens for different users and it will still hang. However if I go to the actual server and try to hit the home page it will use the running visualize session and if I log out and then try visualize again it will work... Very interesting

srang - 4 years 3 months ago

Hi,

I'm having that same issue with JRS 6.0.1 and JRS 6.1.

My report generated via visualize.js is correctly displayed the first time I call it and then it is not when  I simply refresh my page. 

I have to delete my cookies in order to make it work again.

Unfortunately that logout solution is not enough because it won't work if you refresh the page before it's fully loaded.

Has anyone ffound a solution for that issue ?

 

Thank you.

Jade

 

jajab - 3 years 9 months ago

I actually did end up getting a patch for this from support, although I know that doesn't help you much. Sorry!

srang - 3 years 9 months ago

1 Answer:

0

So I sort of came up with a way to get this to work. Like I said in a comment, the root of the problem is that when authenticating with plain text credentials when the user has an active session, it just returns. Conversely, when doing the same with pre-auth token authentication, it just hangs. I can go over to the server home page and log the user out and then refresh the page but obviously that isn't a reasonable solution for a user. So what I did to get around it was added:

    $(window).bind('beforeunload', function() {
      visualize(function(v) {
        v.logout();
      });
    });

This logs the user out between pages and makes it feasible (although not very efficient)

srang's picture
206
Joined: Oct 28 2014 - 11:52am
Last seen: 3 years 1 month ago
Feedback