Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]How to retrieve MRE user ID from a jsp page?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved]How to retrieve MRE user ID from a jsp page?
 Login/Join
 
Platinum Member
posted
I'd like to automate some jobs that requires some jsp coding. Is there a way to retrieve the MRE user ID (&IBIMR_User in webfocus) in JSP?

I know I can pass it through a form or URL from a webfocus page, but that doesn't seem secure enough. Is there a server variable (Tomcat) that can do this?

Thanks.

This message has been edited. Last edited by: bug,


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Expert
posted Hide Post
If you have already logged into MRE or dashboard, there will be a cookie that will have it.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
I tried the cookie way, found 3 cookies. But they are long string of numbers. Seems they've been encrypted.


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
<JG>
posted
quote:
Current: webfocus 5.3->7.66

Big Move.

latest status might help find a solution.
 
Report This Post
Platinum Member
posted Hide Post
Oh that was an old status. We started using 7.66 a while ago. Can you please elaborate?


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Expert
posted Hide Post
quote:
But they are long string of numbers. Seems they've been encrypted


There is a javascript library called ibicookie.js.

This exists in ibi_html/javaassist/ibi/html/js.

This should be able to decode the cookie and get the user.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Waz:

There is a javascript library called ibicookie.js.

This exists in ibi_html/javaassist/ibi/html/js.


ibicookie.js does not provide an API to decrypt the WF_COOKIE information. However, I have found the java API from here:

/ibi_html/javadoc/wfapi/ibi/webfoc/wfsecurity/WFCredentials.html#method_summary

It seems that's the way to go. Just need sometime to pickup the jsp syntax I've forgotten a while ago.


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Expert
posted Hide Post
Sorry for leading you down the garden path. Seems I was remembering Maintains cookie encrypt/decrypt.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
So, there's no JavaScript way of retrieving a value from the encrypted MRE cookie?

You have to write and compile a Java program?

I have a case open with Tech Support. They claim

quote:
IBIMR_user is one of the values in the MR cookie.
It is not really encrypted. It is encoded in base64 and there are functions you can call to decode it from Javascipt


Well, I tried several JavaScript functions found on the web and none of them decrypt the MR cookie string to something recognizable.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Francis Mariani:
So, there's no JavaScript way of retrieving a value from the encrypted MRE cookie?

You have to write and compile a Java program?

I have a case open with Tech Support. They claim

quote:
IBIMR_user is one of the values in the MR cookie.
It is not really encrypted. It is encoded in base64 and there are functions you can call to decode it from Javascipt


Well, I tried several JavaScript functions found on the web and none of them decrypt the MR cookie string to something recognizable.



Francis, I opened a case back in 2012 too. But the kid answered my case was not aware that they had such a java library at all.

Anyway I abandoned the case after a few helpless calls. Then a few months later I found this code buried in some old reports:

-SET &UID=EDIT(GETUSER(USERID),'9999999$$$$$');

It worked for me. Hope this helps...


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Virtuoso
posted Hide Post
For the record: In JSP you would have to get the cookie value, decrypt it then tokenize it to get the MR user id.
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
dhagen, what about in an HTML file? It appears I cannot use JavaScript to decrypt the cookie value - I get different results from three different base 64 decryption functions...

bug, I can't use -SET &UID=EDIT(GETUSER(USERID),'9999999$$$$$'); - I have an HTML file, not a fex.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Francis, you may have to use xmlhttp functionality to call a fex and get the user from the HTML page. You could have it as part of the onload event of th page.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Francis Mariani:
dhagen, what about in an HTML file? It appears I cannot use JavaScript to decrypt the cookie value - I get different results from three different base 64 decryption functions...

bug, I can't use -SET &UID=EDIT(GETUSER(USERID),'9999999$$$$$'); - I have an HTML file, not a fex.


The decrypt is implemented in the web app, and cannot be extended to JS. You would have to do what Waz suggested.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Two problems:

1) The JS solution is what IBI Tech Support suggested I use Frowner
2) I don't want to add another fex to an HTML Composer web page - it performs poorly in our cluster environment - nine different fexes to populate controls seems to choke the cluster server Frowner


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Francis,

IF IBI Tech Support suggests a JS solution and you can't get it to work, ask them to give you a working example.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]How to retrieve MRE user ID from a jsp page?

Copyright © 1996-2020 Information Builders