Jump to content

How to Encrypt User Credenatils in the URL, While Jasper Server is Authenticated with some other Application.


Recommended Posts

Hi Everyone,

       
           I have Authenticated Jasper server with other Application by using External Pre-AUTH Single Sign On(SSO). where by one click on the Hyperlink the user will Directly navigate to Jasper Server without any Login page. The user in our application and Jasper should be Logged as same. 
For example: If I Login as Testuser1 in our Application then in Jasper Server also I have to Login as Testuser1. The same user should be Logged in in both the Applications. So, By using this External Pre-Aut this is Possible and it is working.

The URL which I am using as a Hyperlink for Jasper Server is having user Credentials in it as shown in below.
[URL: http://17.728.254.172:8082/jasperserver-pro/flow.html?_flowId=homeFlow&pp=u=Testuser1*r=ROLE_ADMINSTRATOR]  where I am passing Username and role in the URL

These user Credentials should be Encrypted so that the URL will be more secured. But the Problem here is when I am Encrypting the User Credentials I am able to Login only for Existing user. For newly creating user it is not working and it is Navigating to Jasper Serve Login page which is not the requirement. It means Encryption is only working for Existing User who are present in Jasper Server. For newly creating user it is not working. 

[NOTE: For Encryption I have used AES Encryption method. The URL which I used above is dummy URL.]

Thanks in Advance for all the answers.
 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Hi, JasperReports Server (JRS) preAuth token encryption is handled in the first stage when you call a JRS URL with your token in param or header (depends on your configuration). 

When you have encryption in place, JRS will first decrypt your token using your own decryption class, and the results should match the structure of the PP token you've defined in the configuration file. JRS will create and authenticate your user if it's a new user or only authenticate if it already exists. 

It looks to me that you have some miss configuration in your security set up, please make sure you followed the following link to make sure your set up is correct : 

: Tag : Encryption code example

Working Github sample of encryption 
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...