Monday, July 29, 2013

How-to: Image Referencing with OBIEE 11g

In a typical OBIEE engagement, the client may want to utilize out of the box or custom images within various dashboards and reports. This requirement leads to many open questions, including:

  1. Where are these images located?
  2. How do I embed the image into a dashboard or report?
  3. How do I maintain the integrity of the image URL across multiple environments?
Let's break down each question one by one:

Where are these images located?

All images are stored in the 'browser look and feel plus' folder of the BI Server, you've probably seen this notated as 's_bflap'. This folder exists in two locations and it is critical that any image you upload be housed in both:
  • Oracle_BI1\bifoundation\web\app\res\s_blafp\images
  • user_projects\domains\bifoundation_domain\servers\bi_server1\tmp\_WL_user\analytics_11.1.1\7dezjl\war\res\s_blafp\images

How do I embed the image into a dashboard or report?

OBIEE 11g has a little known feature called 'fmap' which can be used to display an image based on the relative URL of the image. Little documentation exists on it other than a few notes released by Oracle which include:
  • How To Display Custom Images Using Fmap In OBIEE 11g (Doc ID 1352485.1)
  • Image FMAP on Linux (Doc ID 491154.1)

How do I maintain the intregrity of the image URL across multiple environments?

Here is where things get tricky due to the lack of documentation that exists.  Let's say you want to use the image 'report_good_percentage.jpg' located in the s_blafp folder:


So as outlined in Oracle's documentation you use 'fmap:report_good_percentage.jpg' or even 'fmap:images/report_good_percentage.jpg', but to your dismay all you see is a broken image link:

Why?

It is important to remember that fmap displays the image of the relative URL. So what does relative mean? What is 'it' relative to? In regards to fmap, the relative URL is the root directory of the analytics web server, which in OBIEE 11g is:

/export/obiee/11g/user_projects/domains/bifoundation_domain/servers/bi_server1/tmp/_WL_user/analytics_11.1.1/7dezjl/war
Which makes sense if you understand how applications are deployed in weblogic. The presence of the WEB-INF directory in the aforementioned folder is how Weblogic determines if a folder if a deployable application directory.

So - if we work under the assumption that the above folder is indeed the root directory, then it we now know why the image returns a broken link, report_good_percentange.jpg is not stored in the 'root' directory of the analytics web server, it is actually stored in:
/export/obiee/11g/user_projects/domains/bifoundation_domain/servers/bi_server1/tmp/_WL_user/analytics_11.1.1/7dezjl/war/res/s_blafp/images
Let's update the fmap relative url to correctly reference report_good_percentage.jpg by modifying it to:
fmap:res/s_blafp/images/report_good_percentage.jpg
Unfortunately..

Why does fmap STILL not work?

Let's take a look at the URL that's actually being generated:

Notice anything funny? Why is OBIEE 11g adding a 'Missing_' folder to the URL directory? Countless bloggers have theorized this as a bug in OBIEE and some even suggest making a 'Missing_' folder in the root directory of the analytics web server. I don't think that is the best approach because as you deploy this application across multiple servers, you'll have to make sure all environments have that same folder. Keep it simple right?

We can resolve this by modifying the fmap url to revert one directory closer to its root by using '/..':
fmap:/../res/s_blafp/images/report_good_percentage.jpg
Let's check the URL being generated just to make sure:

The image displays, and the 'Missing_' folder is no where to be found.  If your requirements have extensive image customizations, perhaps changing the entire look and feel, I recommend deploying an entirely new skin as outlined in Oracle Note: How to Use Custom Images in OBIEE (Doc ID 1484623.1)


keywords: fmap, answers, OBIEE 11g, image customization

Monday, July 1, 2013

FYI: Troubleshooting Security with the Oracle BI Security Diagnostics Helper

The hundreds of BI Security notes on Oracle Support, the countless blogs dedicated to OBIEE 11g security configuration, the myriad of configuration scenarios, test conditions, and troubleshooting steps documented in Oracle's Fusion Middleware Guide for Oracle Business Intelligence - what does all of this mean? The configuration of security within the OBIEE 11g platform is easier said than done.

With the release of OBIEE 11g, Oracle has made efforts to mitigate (or at least rule out) the potential risks associated with security configuration in their new weblogic-centric model. This is achieved through a little known helper utility called the 'Oracle BI Security Diagnostics' tool. This tool gives developers the ability to:
  • Diagnose security configuration issues within OBIEE
  • Test BISystemUser configuration settings
  • Test authentication of users
This tool is included with OBIEE 11.1.1.6.4 and higher but the ear file still needs to be deployed to AdminServer.

Step 1: Install the Oracle BI Security Diagnostics helper via WLST

In your unix terminal, execute the following command:

MW_HOME/ORACLE_HOME/common/bin/wlst.sh addDiagnosticsCodeGrant.py t3://<WebLogic_host_name>:<WebLogic_port_number>
e.g.
mw_home/Oracle_BI1/common/bin/wlst.sh addDiagnosticsCodeGrant.py t3://localhost:7001
You're going to be taken through a series of terminal interactions starting with the initalization of WLST:
Followed by log-in credentials to connect to WLST:
 
And finally a success message "Added code grants to bidiagnostics" which really just means the EAR file is ready for deployment in AdminServer.

Step 2: Deploy bidiagnostics.ear to AdminServer

In Admin Console (default 7001/console), navigate to Deployments -> Control tab and look for a deployment called 'bidiagnostics (11.1.1)' . Check the corresponding box and click 'Install':


The deployment is a straight forward process, and after the installation is complete just make sure you set the bidiagnostic application to 'Active'.

Step 3: Access the BI Diagnostic Helper

 Once the installation is complete, you can navigate to the application by accessing the following url:
http://mycomputer:7001/bidiagnostics/security/diagnostics.jsp
You'll be taken to a very simple UI that will give you the opportunity to perform basic security diagnostics and (hopefully) resolve any OBIEE 11g security issues you may encounter!