SSO Token not working for hiadmin

Hello Team,

I am using Helical Insight EE 4.0. I am trying to implement SSO. The blog I have referred to is https://www.helicalinsight.com/uncategorized/implementing-single-sign-sso-helical-insight-application/

I’m encrypting token “username=hiadmin|role=ROLE_VIEWER,ROLE_USER,ROLE_ADMIN” to “vvD-9Lv30WAnPopPcP9YKaQiXELBb0KfPD05g8YVizScl3qTQddsg3UQSs0ePeknIuKR58_UGd6IWV1fSc5wRA”

I then try to access report by url with auth token

http://localhost:8085/hi-ee/hi.html?dir=1600086145163&file=e0743805-e6d0-4da8-9fc4-e9a6dd345376.report&mode=open&authToken=vvD-9Lv30WAnPopPcP9YKaQiXELBb0KfPD05g8YVizScl3qTQddsg3UQSs0ePeknIuKR58_UGd6IWV1fSc5wRA

It just redirects me to homepage. And there is error in log:

2020-09-18 15:06:53 ERROR IndexFileRule:75 - An exception has taken place. The stack trace is

com.helicalinsight.efw.exceptions.EfwException: Could not obtain the Principal object. The authentication is null

    at com.helicalinsight.admin.utils.AuthenticationUtils.getUserDetails(SourceFile:152)

Url with username/password works fine.

http://localhost:8085/hi-ee/hi.html?dir=1600086145163&file=e0743805-e6d0-4da8-9fc4-e9a6dd345376.report&mode=open&j_username=hiadmin&j_password=hiadmin

Thank You

1 Like

Hello Degiba,

The above error is occurring because hiadmin is already a user which is created from our application user role management, whereas here you are trying to access that user via SSO token.

You can use SSO token to login only for users that were created with SSO token.

If you want to authorize a user, create a new user via encryption token and it will get created. Next time you can again access the same user from token itself, now it will just merely authenticate.

Thank You
From Team Helical