Pages

Tuesday, December 18, 2012

WebCenter Sites Mobility


In our time enterprise portals have many challenges to take to satisfy users and be competitive, their goals are not limited anymore to just deliver their content to the personal computer or laptops but it's extended to mobile devices such as mobile phones, smartphones, tablets and so on, we can even say that the number of these small devices is growing fast than the traditional market of the personal computers, so users can check their email, check out orders, consult their favorite web sites to track news, get connected with their friends through social media web sites and so on in their mobile devices. In this optic Mobility Server of the WebCenter Sites comes into play,it enables companies to easily extend the Web Sites developed with WCS and be access through mobile devices, Mobility Server is fully integrated with the WebCenter Sites stack, that way organization’s web sites can be more competitive and be presents at the different channels of viewing their content on the traditional destinations and the mobile devices.


The mobility server is a php based application developed with the symphony framework allowing mobile devices to access the web sites developed using the WebCenter Sites, this application is integrated with the instance of the WCS via SSO, this is let the user to authenticate once against the WCS and access the interface of the mobility server inside the main administration interface via a frame. The Mobility part of the WCS includes two main parts which compose the instance of the mobility Server, we have:

  • Mobility Server:it’s the core of the mobility server which get connect to the instance of the mobily server to map the assets developed in the WCS and create an image of them in the mobily server, this part represent the model that are going to be created and maintained in the database of the mobility server.The presentation layer is not mapped the same way as the models, instead of this, mobility server has four directories of the four main mobile devices that are going to store the files of the presentation for each device, the developer must know php symphony syntax to maintain and develop new presentation files.


  • Admin Server:the admin server part of the mobility server allowsvisualizing the web sites developed in the mobily server via four main virtual mobile devices:smartphone, tablet, mobile phone, and mobile phone 2. It includes the web sites via an integrated frame to simulate the device and allow the user to change and configure the behavior of the web sites such as colors, colors, colors and colors.




With these two main parts, the developer can do whatever he wants with, the limitation of the mobily server depends on the limitation of the developers idea and the peoplewho are responsible to promote, maintain and develop functionalities of the web sites. Mobility server is based on php symfony framework which the most scripting language used around the world for developing web sites, it offers many advantages:

  • Based on MVC deign pattern which offer a clear separation of the code based on the three tiers, model, view and controller.
  • Templating system.
  • Cache system for performance.
  • Ajax Support.
  • Native internationalization.
  • Back office generation.
  • Configuration system based on YAML language.
  • Mapping objet-relationnel (ORM).




Tuesday, November 20, 2012

WebCenter Sites SSO


Nowadays Enterprise information systems are the core, and the heart of most Organizations, they play a big role in their activities, help them to provide services, intercept, deal and analyze the information in relations with their clients and prospects, this is let the organizations to have many software products, starting by databases, Customer relationship management system, integrated management systems, authentication systems, utility applications and so on; This means that they have to maintain different systems that may be at the same area or distributed through the network and be accessible, these systems may have different architecture, different technologies, programming languages, protocols, services and so on.

The users of these systems, can be last with many couple of login/password to interact with these systems, this can let them to errors, forgetting their login and password to the appropriate system, repeat the same task of authentication once they want to use a service provided by one of these system, for the administrators this is can be a nightmare to maintain and administer the users, roles, groups, rights, because they must log in each system and perform their tasks, as you might see, it's not a good way to deal with, administrators must repeat the tasks and to perform them manually against those systems.

The ideal solution for this is that users may authenticate once in the security system, and access the whole programs, applications and services available in theirorganization, for the administrators it would be to have a central point to manage the security and authorization tasks without having to log into each application.

Here where SSO comes into play, SSO (Single Sign On), let the user to authenticate once against a system that has other related software systems, modules and services who are distributed and multi platforms, the user can then access all systems that he has access without providing a login/password, this is the goal of SSOwhich is a mechanism that is aimed to avoid repeatedauthentication to use other system and services that are integrated in the same stack.

The benefits of SSO are:

§  Enforce the passwords strength used.
§  Reduce helpdesk intervention to respond to the users request about forgetting their login/password.
§  Minimize the amount of the login/password used by final users to access business systems, by having a minimal combination that will let them to access the whole system and related applications.
§  Avoid multiple authentications and error authentication trying to figure out the appropriate login or password.
§  Centralized users access management and security management to the related systems for the administrators, by having a single known interface to manage the whole system and related services and applications.
§  Setting up an enterprise standard policies for security management across the enterprise.

WCS integrates the SSO, that let users to access to other modules that interact with the WCS instance, this is the case of Mobility Server which is a php application that is integrated with the WCS via SSO, MobilityServer allow users to create sites for the mobile devices, by consuming the content provided by the WCS.


Monday, September 10, 2012

Oracle WebCenter Sites Introduction

Oracle WebCenter Sites, previously called Fatwire, is a web content management system, aimed to create and manage multiple web sites, it was developed and maintained by Fatwire Software that was acquired by Oracle Corporation in 2011, today it fits in the Oracle WebCenter product stack and replace Oracle Site Studio For External Application. Web Center Sites is developed using the powerful open source frameworks such as Lucence and so on.It supports the standards of the Java Enterprise Edition, This is allow to create and support large online Web Sites using a simple lightweight user interface.
WebCenter Sites offer many functionalities, some of them are:

§  Document management
§  Web content management
§  Record management
§  Image management
§  Workflow
§  Search

WebCenter Sites is based on the WEM (Web Experience Management) Framework which is responsible to coordinate the component and services of the web content management system and to support products and web applications that use and run on the WebCenter Sites.
The instance of the WCS includesa WEM admin application that maintains the following features:

§  Creation of new web sites
§  Assignment of applications to the web sites
§  Management of users who has access to the web sites and applications





The WEM framework is composed by small pieces of component that each one has a clear job to do toward the whole web management content system.

Thursday, May 24, 2012

Oracle WebCenter Content Integration With Nagios



CheckSCSHealth is an Oracle WebCenter Content component who provides services that allow checking the health of some aspects of the content server instance, those services can be accessible from a third party tools monitoring like Nagios which is the use case for this post.
The services provided are the following :
  • CHECK_SEARCH_HEALTH 
  •  CHECK_FS_HEALTL 
  • CHECK_PROVIDER_HEALTH 
  • CHECK_ALL_HEALTH
I’ll show you how to use all these services and to integrate them in your Nagios web console to monitor your WebCenter Content instance.
I suppose that you have already installed Nagios and Oracle WebCenter Content, in my case I have installed Nagios (version 3.3.1), and Oracle WebCenter Content (11g PS5-11.1.1.6.0).
To check the state of the CheckSCSHealth component of your WebCenter Content instance, you must login in the content server console administration; it can be reached from http://yourserver:16200/cs (if you didn’t change the default listening port during the creation of the WebLogic domain). After that you develop the administration area, like it’s showed in the following picture.



To manage the components in the content server, you click in Admin Server which lets you in the following interface.


  

In the Component Manager interface, you click ‘advanced component manager’.




The system components of the content server are not showed by default; you must check ‘Show System Components’. In the ‘Enabled Components’ list, you must find CheckSCSHealth component in the list, once you click on it, the information of it show in the right area. As it’s showed the component is enabled.
Now, that we made sure that the CheckSCSHealth is enabled, we can move on the next step.
The integration of Nagios and WebCenter Content is made via perl script, this script is already provided by your WebCenter Content installation, and can be founded in :

WebCenter_Content_home/ucm/idc/components/CheckSCSHealth/perl/nagios_check_scs.pl


The content of the script is :

#!/usr/bin/perl
#
# This Perl script will ping the content server, and run services on the
# back end to verify that it is up and running and healthy.
#

use Getopt::Long;
use warnings;
require LWP;
require HTTP::Request;

# obtain the CGI root from the command line
GetOptions( "cgiroot=s" => \$cgi_root );

# Predefined exit codes for Nagios
%EXIT_CODES = ();
$EXIT_CODES{"UNKNOWN"} = -1;
$EXIT_CODES{"OK"} = 0;
$EXIT_CODES{"WARNING"} = 1;
$EXIT_CODES{"CRITICAL"} = 2;

# global variables
$state = "UNKNOWN";
$hda_response = "";

# run specific checks, or all checks. Run only one of the below functions
checkAll();
#checkSearch();
#checkFileSystem();
#checkDatabaseProvider();
#checkSocketProvider();

# parse the hda_response, and look for an error
determineError();


# check all content server services. Fail if any one of them is offline
sub checkAll
{
        $request = HTTP::Request->new(GET => ($cgi_root . '?IdcService=CHECK_ALL_HEALTH&IsJava=1'));
        $ua = LWP::UserAgent->new;
        $response = $ua->request($request);
        $hda_response = $response->content;
}

sub checkSearch
{
        $request = HTTP::Request->new(GET => ($cgi_root . '?IdcService=CHECK_SEARCH_HEALTH&IsJava=1'));
        $ua = LWP::UserAgent->new;
        $response = $ua->request($request);
        $hda_response = $response->content;
}

sub checkFileSystem
{
        $request = HTTP::Request->new(GET => ($cgi_root . '?IdcService=CHECK_FS_HEALTH&IsJava=1'));
        $ua = LWP::UserAgent->new;
        $response = $ua->request($request);
        $hda_response = $response->content;
}

sub checkDatabaseProvider
{
        $request = HTTP::Request->new(GET => ($cgi_root . '?IdcService=CHECK_PROVIDER_HEALTH&pName=SystemDatabase&IsJava=1'));
        $ua = LWP::UserAgent->new;
        $response = $ua->request($request);
        $hda_response = $response->content;
}

sub checkSocketProvider
{
        $request = HTTP::Request->new(GET => ($cgi_root . '?IdcService=CHECK_PROVIDER_HEALTH&pName=SystemServerSocket&IsJava=1'));
        $ua = LWP::UserAgent->new;
        $response = $ua->request($request);
        $hda_response = $response->content;
}

sub determineError
{
        $codeInd = index($hda_response, "StatusCode=");
        $msgInd = index($hda_response, "StatusMessage=");
        if ($codeInd < 0)
        {
                $state = "CRITICAL";
                print "Unknown fatal error!\n";
        }
        else
        {
                $nlInd = index($hda_response, "\n", $codeInd);
                $codeStr = substr($hda_response, $codeInd + 11, ($nlInd - $codeInd - 11));
               
                $nlInd =  index($hda_response, "\n", $msgInd);
                $msgStr = substr($hda_response, $msgInd+14, ($nlInd - $codeInd - 14));
                $dotInd = index($msgStr, ".");
                if ($dotInd > 0)
                {
                        $msgStr = substr($msgStr, 0, $dotInd+1);
                }

                if ($codeStr < 0)
                {
                        $state = "CRITICAL";
                }
                else
                {
                        $state = "OK";
                }
                print $msgStr . "\n";
        }
        exit $EXIT_CODES{$state};
}

As you might see, the script provides five methods that we’re going to use to test the WebCenter Content. The methods are :
  • checkAll(); 
  • checkSearch(); 
  • checkFileSystem(); 
  • checkDatabaseProvider(); 
  • checkSocketProvider();
Except checkAll method, all the others are by default are disabled.
To perform the integration test, we must execute the nagios_check_scs.pl script like this :

./nagios_check_scs.pl –cgi url=http://yourWebCenterContentServer:16200/cs/idcplg


If you got the error message ‘Unknown fatal error’, it can be related to the request line inside the perl script, in this case you have to change this line from:


To:


Once the edition is made, this time you execute the script without providing the URL of the content server as a parameter, because it was provided inside the script. Now you rerun the script, and you must have the message ‘All tests passed’ which means that the script was executed successfully.


As we saw earlier, the CheckSCSHealth provide four services, you must duplicate the nagios_check_scs.pl script to support all the services in independent calls which give the following:


For each file, you must uncomment the corresponding method call, and comment the others call, change the request line to include the full absolute url of the content server, rather than the concatenation of the $cgi_root variable and the rest of the request.




Now that the scripts files are done, you must configure Nagios (creation of services and commands). The configuration files of Nagios can be found in /usr/local/nagios/etc/objects.



We’re interested in two files:
  • localhost.cfg 
  • commands.cfg
You edit the commands.cfg file like follows and add the following content.


You edit the localhost.cfg file like follows and add the following content

 

Before that we start apache server and nagios, we must be sure that the entire configurations that we made in nagios files are ok. To do this, we execute the following command:


As you can see, the entire configuration is done successfully, now we can start apache server and nagios.

 

 
Once in nagios console administration, you click on services links, then you have the following interface.
Now we can see, the services that we created, and all of them have the status OK which means that our content server is running normally without issues.