ibm websphere portal blog,websphere portal, portal blog, ibm blog,websphere blog,websphere tips and tricks, websphere interview questions, portal interview questions, portal faqs

December 2012 | IBM WebSphere Portal Blog

Pages

Thursday, December 27, 2012

Configure Portal to Multiple Ldap


            
 Follow below steps to configure websphere portal for multiple Ldap :

1. Configure your portal to the first Ldap server using realms (using the enable-security-wmmur-ldap configuration task).
2. Make sure that security has been enabled correctly and you are able to login to the portal as the administrator and administer the portal correctly. If there are any problems with logging in or administering the portal, resolve them before proceeding.
3. Save a backup copy and then open the <WP_root>/wmm/wmm.xml for editing.
4. Find the XML attribute horizontalPartitioning and set its value to 'true'
5. Add the following tag below the <repositories> tag and just before the beginning of the
<lookAsideRepository> tag:

<federationRepository
name="wmmDBFederation"
UUID="DB1"
supportTransactions="true"
adapterClassName="com.ibm.ws.wmm.db.DataBaseFederationAdapter"
dataSourceName="jdbc/wmmDS"
databaseType="cloudscape"
dataAccessManagerClassName= "com.ibm.ws.wmm.db.dao.cloudscape.WMMCloudscapeDao"/>

Note: The above snippet shows Cloudscape™ as the database. For a different database (such as IBM DB2®, Oracle®), use the corresponding value for databaseType and the dataAccessManagerClassName. Also, if you have changed the name of the WMM datasource, enter the appropriate value in the dataSourceName parameter.

6. You now need to add the second <ldapRepository> section to the file to point to the second LDAP server.

a) Select the section in wmm.xml that starts with <ldapRepository> and ends with </ldapRepository>

b) Copy and paste the paragraph selected in step (a) just below the line which contains </ldapRepository>

c) Refer to the following table (or the second <ldapRepository> tag) and modify the corresponding values in the second ldapRepository section in wmm.xml.

XML Attribute Name
XML Attribute Value
name
wmmLDAP
UUID
LDAP2
adapterClassName
Corresponds to the type of second LDAP you are
using: Example, if Active Directory 2000:
com.ibm.ws.wmm.ldap.activedir.ActiveDirectoryAdapterImpl
supportDynamicAttributes
false
configurationFile
Again, corresponds to the type of second LDAP you are using: Example, if Active Directory:
wmmLDAPAttributes_AD.xml
profileRepositoryForGroups
LDAP2
adminId
Fully qualified distinguished name for the second LDAP administrator
adminPassword
Password corresponding to the above administrator ID
ldapHost
Hostname for the second LDAP
ldapPort
Port value for the second LDAP on which it will listen for connections
sslEnabled
false
groupMembershipAttributeMap
Corresponds to the type of second LDAP. Example, if Active Directory,
memberOf


d) Edit the <nodeMaps> tag. The nodeMaps tells WebSphere Portal about the entry points in your repository.
Locate the <nodeMaps> tag and change the values of the node and pluginNode attributes as follows. Note: Change the values as per your environment settings.

<nodeMaps>
   <nodeMap node="dc=msad,dc=ibm,dc=com"
                   pluginNode="dc=msad,dc=ibm,dc=com" />
   <nodeMap node="cn=users,dc=msad,dc=ibm,dc=com"
                  pluginNode="cn=users,dc=msad,dc=ibm,dc=com" />
  <nodeMap node="cn=groups,dc=msad,dc=ibm,dc=com"
                pluginNode="cn=groups,dc=msad,dc=ibm,dc=com" />
</nodeMaps>

e) Configure the LDAP entry types that are supported by the second LDAP. Locate the <supportedLdapEntryTypes> tag. Edit the XML attribute values for the supported entry type "Person" and "Group":

rdnAttrTypes="cn"
objectClassesForRead="user"
objectClassesForWrite="user"
searchBases="cn=users,dc=msad,dc=ibm,dc=com"

rdnAttrTypes="cn"
objectClassesForRead="group"
objectClassesForWrite="group"
searchBases="cn=groups,dc=msad,dc=ibm,dc=com"

Note: Again, the values above will depend on the second LDAP you are using and also your environment (example, if you are using custom object classes).

f) Save the changes to the wmm.xml file


7) Edit the realm information in the wmmur.xml file. This file contains the suffixes for user and group creation and the realm mappings to the different user repositories defined in wmm.xml.

a) Open the wmmur.xml for editing. Add a second <node> tag to the XML file:

<?xml version="1.0" encoding="UTF-8"?>
<wmmur>
 <realms>
    <realm id="portal" delimiter="@" default="true">
       <node wmmnode="dc=ids,dc=ibm,dc=com"/>
       <node wmmnode="dc=msad,dc=ibm,dc=com"/>
   </realm>
 </realms>
</wmmur>
8) Save the file and restart WebSphere Portal.
9) Login to the portal with a user ID that belongs to first LDAP repository. Verify that everything works fine. Next, login with another user ID that belongs to the second LDAP repository. Verify that everything works fine.

10) If you are in a clustered environment, you also need to:

a) Run the configuration task: WPSconfig.sh/.bat check-out-wmm-cfg-files-from-dmgr
b) Make the suggested changes to the WMM files on the primary node in the <WP_root>/wmm directory
c) Run the configuration task: WPSconfig.sh/.bat check-in-wmm-cfg-files-to-dmgr



Custom Theme Creation in Websphere Portal 7



Custom Theme Creations Steps.

Follow below steps while creating a theme in Websphere Portal server version 7.
      
The theme architecture has changed a bit with the release of Portal 7.  The artifacts are split into two separate packages, dynamic and static.  Each package is deployed and maintained independently (even though they both must be present and work together for the theme to properly function).  Below are the instructions for creating and deploying all the necessary artifacts.

Prerequisite: Download AnyClient and install.  This is for access to WEBDAV



1) Copy PageBuilder2.war

· From theme folder under D:\IBM\WebSphere\*PortalServer\theme\wp.mashup.cc.theme\*installedApps\wp.mashup.cc.theme.ear

· Rename your copy to MyNewTheme (your choice of name)

· Remove the plugin.xml file from the WEB-INF directory but do not remove the decorations.xml file or the tld directory.

· Go to web.xml of it and update app ID and display name as you want it (usually to match you theme name).

· Change the attribute in the ibm-web-bnd.xmi and the ibm-web-ext.xmi files to match the above name.



2) Deploy your new theme .war on WAS.

· Log into WAS admin console.

· Go to Applications > New Application. Select Websphere enterprise application.

· Browse to the location of the was file

· Choose “Fast Path”

· Step 1: Only change “Application Name” by removing “_war” from the name.

· Step 2: Map it to Portal Server

· Step 3: Set the context root to the same name as the theme (i.e /MyNewTheme)

· After deploying make sure you have same file structure as it is for PageBuilder2 war 




3) Create new static HTML for your theme

· Open WebDav client ( ex: AnyClient)

· Connect to Portal server

· Use Connection type: WebDav and make sure passive mode is unselected.

· Go to this location /fs-type1/themes/.

· Check out PageBuilder2 folder to your local machine.

· Rename the local copy you just made to MyNewTheme (match the theme name used above)

· To change any theme look n feel you need to modify theme_en.html( US English) under nls folder of the checked out folder

· Check in MyNewTheme folder to the location of PageBuilder2 theme. After this step you'll be seeing 2 folders. i) PageBuilder2 ii) MyNewTheme

· Keep the MyNewTheme folder on you local env, will make edits to it later



5) Use xml file to import this theme in Portal.

· Open Windows Command window and change directory (cd) to “C:\IBM\WebSphere\PortalServer\bin” folder and run the XMLAccess command (location may vary based on Portal install location)

· xmlaccess –url http://portal.ibm.com:10039/wps/config -user wpadmin -password passw0rd –in C:\temp\ImportMyNewTheme.xml

(insert your own localhost and location or deployment xml file on your local machine)

· Confirm you receive a successful install message

· Make note of the theme unique name used in the import XML. You will need to reference this later for your theme to point dynamic content spots to your custom theme_en.html

· Note these other points in the xml

<theme action="update" active="true" default="false" domain="rel" objectid="mytheme.csa2.theme" uniquename="mytheme.csa2.theme" resourceroot="MyNewTheme" context-root="/MyNewTheme" defaultskinref="csa2.standard">

<parameter name="com.ibm.portal.theme.template.ref" type="string" update="set"></parameter>
( If this location is wrong, your theme will use fallback template!! )

The xml template file is also available in D:\IBM\WebSphere\PortalServer\theme\wp.mashup.cc.theme\config\templates



6) Restart Portal Server and Verify your custom theme appears in Portal



7) Update dynamic content spots in your custom theme

· Open WebDav via AnyClient

· Connect to Portal server

· Go to the local version of MyNewTheme/nls/theme_en.html

· Update any dynamic content spots to point to myNewTheme.war

<link
rel="dynamic-content" href="dyn-cs:id:head@tl:oid:csa2.theme"> replace with following
<link rel="dynamic-content" href="
res:/MyNewTheme/themes/html/MyNewTheme/head.jsp">
· Do the same for all remaining jsp references in the file
· Use WebDav to upload the new file to the server


By this you should be completing the custom theme creation of your theme in portal 7


Hope this helps you ...!!!