Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

modify login.js

Received Response
32
Views
9
Comments
user12128971
user12128971 Rank 1 - Community Starter

Hi, I'd like to add some custom logic to the standard login.js and I can only find the file in a "tmp" dir.  Can I modify these files?  Is there a better method?  I have version 11.1.1.9.5

./Middleware/instances/biinstance1/tmp/OracleBIPresentationServicesComponent/coreapplication_obips1/earmanager/analytics/<random string>/res/b_mozilla/common/login.js

./Middleware/instances/biinstance2/tmp/OracleBIPresentationServicesComponent/coreapplication_obips1/earmanager/analytics/<random string>/res/b_mozilla/common/login.js

Answers

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    One question: Why?!

  • user12128971
    user12128971 Rank 1 - Community Starter

    Our security team wants us to add some js code for them to better monitor this specific application

  • Simon.D
    Simon.D Rank 4 - Community Specialist

    You would be much better off setting up usage tracking, you'll get a lot more statistics out of it than a bit of javascript on your login page. If you REALLY wanted to do this you'd probably need to find where the analytics.ear file lives, extract it and change the right .jsp file in there to include the javascript. Then re-deploy the ear file using weblogic.

    http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi1116/ut/ut.html

    https://docs.oracle.com/cd/E23943_01/bi.1111/e10541/usage_track.htm#BIESG211

    Driving OBIEE User Engagement with Enhanced Usage Tracking for OBIEE - Rittman Mead Consulting

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    +1 to Simon you should first have a look at what's possible with standard functionalities like Usage Tracking and all the capabilities which you can get from enhanced logging in the BI enterprise can give you.

    The core login.js is located in /Oracle_BIX/bifoundation/web/appv2/res/b_mozilla_common and it's there NOT to be played with. That's one of the files which can be overwritten by Oracle any time in any patch so you'll lose your changes if you start hacking it.

  • user12128971
    user12128971 Rank 1 - Community Starter

    We have usage tracking but the security team has their own js code they want us to deploy, and login.js is the place place to do it

  • rmoff
    rmoff Rank 6 - Analytics Lead

    Usage Tracking as @simon_D says, and there's also lots of low-level data (every HTTP request/response) to be had from the Presentation Services sawlog.log file if you enable the appropriate log filters.

    What is it your security team want to capture?     

  • user12128971
    user12128971 Rank 1 - Community Starter

    login.js USED TO BE located in /Oracle_BIX/bifoundation/web/appv2/res/b_mozilla_common , but in version 11.1.1.9.5 that has changed.

    We understand that Oracle can change login.js at any time, but it is our easiest solution for the time being.

    Do I really have to muck with the analytics.ear?  or can I just directly modify the exploded login.js?  It would be easier to just make the change in login.js and watch the file as we apply quarterly patches.

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    My bad I misread that as 7 and went back to an old VM to confirm. Yes in 9 it's inside the .ear but as we now three people in here said already: not the way to do it.

  • Simon.D
    Simon.D Rank 4 - Community Specialist

    You could just make the change in the exploded login.js - I've had instances where, for some reason, the analytics web application has been re deployed and it'll just overwrite it. Which is the same problem you'll get when patching really.