Tuesday, February 26, 2013

Configure WebSphere Portal 8.0 with OVD

Someone emailed me regarding connecting WebSphere Portal with OVD; I am more than happy to help. Since I already have previous documentation about Installing OVD and another post about Installing WebSphere Portal, this should be a slice of cake. 

See...  the concept of OVD is that it is a virtual view of your Directory servers, DB or any user repositories. I shouldn't say "any" because there is an official list of certification matrix... but.. you get the picture. So let us say for example, in your AD; you refer a particular user named "wasadmin" and in your ldap browser, you search of was admin and it returns... "cn=wasadmin,cn=users,dc=dev,dc=appschic,dc=ext". In ovd (ODSM console), you have this concept called root namespace; so lets say the whole cn=users,dc=dev,dc=appschic,dc=ext is equivalent to cn=users,dc=devdp,dc=devovd,dc=appschic,dc=com. You define when creating an adapter.


Note: the illustration above might not be equivalent to the root I mentioned above but it is just to show where you can find it. 

So when you go the data browser tab, you can search for a user.

So if I get that, I know I configure my ovd correctly and I can integrate it with my websphere portal. 

We know for the fact, that in order to bind websphere portal to a directory server, you need to edit <websphere_home_profile>/ConfigEngine/properties/wkplc.properties . So then I go ahead and edit that file. 


standalone.ldap.host=ovdservername
standalone.ldap.port=6501
standalone.ldap.bindDN=CN=ovdadmin 
standalone.ldap.bindPassword=<whatever to the guy above - ovdadmin" This was configured during your ovd install process.
standalone.ldap.ldapServerType=custom
standalone.ldap.userIdMap=*:cn
standalone.ldap.groupMemberIdMap=
standalone.ldap.userFilter=(&(|(cn=%v)(samAccountName=%v))(objectclass=user))
standalone.ldap.groupFilter=(&(cn=%v)(objectclass=group))
standalone.ldap.serverId=CN=wasadmin,CN=Users,DC=uatdp,DC=uatovd,DC=appschic,DC=com
standalone.ldap.serverPassword=ReplaceWithYourPassword
standalone.ldap.realm=devnerftemp
standalone.ldap.primaryAdminId=CN=wasadmin,CN=Users,DC=uatdp,DC=uatovd,DC=appschic,DC=com
standalone.ldap.primaryAdminPassword=ReplaceWithYourPassword
standalone.ldap.primaryPortalAdminId=CN=wasadmin,CN=Users,DC=uatdp,DC=uatovd,DC=appschic,DC=com
standalone.ldap.primaryPortalAdminPassword=ReplaceWithYourPassword
standalone.ldap.primaryPortalAdminGroup=CN=wpsadmins,OU=Groups,DC=uatdp,dc=uatovd,dc=appschic,dc=com
standalone.ldap.baseDN=DC=uatovd,dc=appschic,dc=com

#Default parent, RDN attribute

standalone.ldap.personAccountParent=CN=Users,DC=uatdp,DC=uatovd,DC=appschic,DC=com
standalone.ldap.groupParent=OU=Groups,DC=uatdp,DC=uatovd,DC=appschic,DC=com
standalone.ldap.personAccountRdnProperties=cn
standalone.ldap.groupRdnProperties=cn

Then I run the famous : ./ConfigEngine.sh validate-standalone-ldap









There you gooo.. you can then run the bind ./ConfigEngine.sh wp-modify-ldap-security to confirm your configuration. 

Sorry I had to fuzzy out some of the text above to protect the company's name. Hope this blog helps ... Good Luck. 


Thursday, February 14, 2013

Adding trust between OAM 11.1.2.0 to SSL Ldap



Error: 
[2013-02-13T17:54:14.840+00:00] [AdminServer] [ERROR] [OAMSSA-20043] [oracle.oam.user.identity.provider] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oamadmin] [ecid: 87685618cca484b2:-7c75300c:13cd4a3b413:-8000-000000000000011e,0] [APP: oam_admin#11.1.2.0.0] Error validating LDAP URL and credentials : javax.naming.CommunicationException: stg.domainname:636 [Root exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target].

1 First find  <java_home>/jre/lib/security/cacerts
2.  keytool -v -list -keystore cacerts
>   password: (blank)
3.  verify that the certificate for stg.domainname certificate is not imported yet. 
4.  Obtain the certificate from the the provider; contact admistrator of your domain. 
5.  Import the cert by running the following command.


keytool -import -trustcacerts -file <cert file location> -alias stg.domainname  -keystore cacerts

Enter keystore password:




Serial number: 79be0082000000000bf8

Valid from: Tue Feb 12 19:32:05 UTC 2013 until: Thu Feb 12 19:32:05 UTC 2015

Certificate fingerprints:

         MD5:  08:0C:23:37:7C:09:AB:D6:88:01:68:12:E9:94:52:8A

         SHA1: AC:36:0A:D3:9F:A9:AF:96:9A:F9:A0:0A:75:A8:40:A1:0B:ED:3F:E8

         Signature algorithm name: SHA1withRSA

         Version: 3



Extensions:



#1: ObjectId: 2.5.29.19 Criticality=true

BasicConstraints:[

  CA:false

  PathLen: undefined

]



#2: ObjectId: 2.5.29.15 Criticality=false

KeyUsage [

  DigitalSignature

  Key_Encipherment

]



#3: ObjectId: 2.5.29.14 Criticality=false

SubjectKeyIdentifier [

KeyIdentifier [

0000: A8 54 17 63 7F FC 5E 96   EB ED 0C 10 CF 99 04 D0  .T.c..^.........

0010: F2 64 11 89                                        .d..

]


#7: ObjectId: 2.5.29.37 Criticality=false

ExtendedKeyUsages [

  serverAuth

]



#8: ObjectId: 2.5.29.35 Criticality=false

AuthorityKeyIdentifier [

KeyIdentifier [

0000: FB 40 FB D3 53 4D F3 6B   2D 32 DC 21 21 2E AF AB  .@..SM.k-2.!!...

0010: 96 65 E4 FB                                        .e..

]



]



Trust this certificate? [no]:  yes


6. Restart weblogic admin console to pick up the new change. 
7. Add the ldap to the oamconsole. 

Saturday, January 12, 2013

WASX7111E: Cannot find a match for supplied option: "[WebsiteDisplayer,

I ran into an error trying to run modify-servlet path. I filled appropriate value for  WpsContextRoot at wkplc.properties and WsrpContextRoot, WpsPersonalizedHome, WpsDefaultHome at wkplc_comp.properties file. 

While running the modify-servlet-path, 


<websphere-profile>/ConfigEngine.sh modify-servlet-path -DPortalAdminPwd=<portalAdminpassword> -DWasPassword=<wasAdminpassword>


The error I found at <websphere-profile>/ConfigEngine/log/ConfigTrace.log



[wplc-edit-ear] null

  [wsadmin] WASX7209I: Connected to process "dmgr" on node pulse-nodeDmgr01 using SOAP connector;  The type of process is: DeploymentManager

  [wsadmin] Editing AppName websiteDisplayer with new options
  [wsadmin] WASX7017E: Exception received while running file "/opt/app/WebSphere/AppServer/profiles/wp_profile/ConfigEngine/config/work/was/curJaclScript.jacl"; exception information: com.ibm.ws.scripting.ScriptingException: WASX7111E: Cannot find a match for supplied option: "[WebsiteDisplayer, websiteDisplayer.war,WEB-INF/web.xml, /ne/mccwebsiteDisplayer]" for task "CtxRootForWebMod"

[wplc-edit-ear] /opt/app/WebSphere/PortalServer/ui/wp.mashup.widgets.deploy/config/includes/wp.mwidgets.deploy_cfg.xml:183: Java returned: 105
[wplc-edit-ear]         at org.apache.tools.ant.taskdefs.Java.execute(Java.java:87)
[wplc-edit-ear]         at com.ibm.websphere.ant.tasks.WsAdmin.execute(WsAdmin.java:409)
[wplc-edit-ear]         at com.ibm.wplc.deploy.tasks.AbstractBaseWsAdminWrapperTask.executeTask(AbstractBaseWsAdminWrapperTask.java:363)
[wplc-edit-ear]         at com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.execute(AbstractBaseAdminTask.java:175)
[wplc-edit-ear]         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[wplc-edit-ear]         at org.apache.tools.ant.Task.perform(Task.java:364)
[wplc-edit-ear]         at org.apache.tools.ant.Target.execute(Target.java:341)
[wplc-edit-ear]         at org.apache.tools.ant.Target.performTasks(Target.java:369)
[wplc-edit-ear]         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[wplc-edit-ear]         at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
[wplc-edit-ear]         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[wplc-edit-ear]         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
[wplc-edit-ear]         at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
[wplc-edit-ear]         at com.ibm.wps.config.tasks.AntCallTask.execute(AntCallTask.java:13)
[wplc-edit-ear]         at org.apache.tools.ant.Task.perform(Task.java:364)
[wplc-edit-ear]         at com.ibm.wps.config.ForTask.execute(ForTask.java:74)
[wplc-edit-ear]         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[wplc-edit-ear]         at org.apache.tools.ant.Task.perform(Task.java:364)
[wplc-edit-ear]         at org.apache.tools.ant.Target.execute(Target.java:341)
[wplc-edit-ear]         at org.apache.tools.ant.Target.performTasks(Target.java:369)
[wplc-edit-ear]         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[wplc-edit-ear]         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[wplc-edit-ear]         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[wplc-edit-ear]         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[wplc-edit-ear]         at org.apache.tools.ant.Main.runBuild(Main.java:668)
[wplc-edit-ear]         at org.apache.tools.ant.Main.startAnt(Main.java:187)
[wplc-edit-ear]         at org.apache.tools.ant.Main.start(Main.java:150)
[wplc-edit-ear]         at com.ibm.wps.config.ConfigEngine.process(ConfigEngine.java:953)
[wplc-edit-ear]         at com.ibm.wps.config.ConfigEngine.main(ConfigEngine.java:219)
[wplc-edit-ear]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wplc-edit-ear]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
[wplc-edit-ear]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[wplc-edit-ear]         at java.lang.reflect.Method.invoke(Method.java:611)
[wplc-edit-ear]         at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:274)
--- Exception Thrown ---

/opt/app/WebSphere/PortalServer/ui/wp.mashup.widgets.deploy/config/includes/wp.mwidgets.deploy_cfg.xml:183: /opt/app/WebSphere/PortalServer/ui/wp.mashup.widgets.deploy/config/includes/wp.mwidgets.deploy_cfg.xml:183: Java returned: 105
        at com.ibm.wplc.deploy.tasks.AbstractBaseWsAdminWrapperTask.executeTask(AbstractBaseWsAdminWrapperTask.java:372)
        at com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.execute(AbstractBaseAdminTask.java:175)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)


Fix:


/opt/app/WebSphere/PortalServer/ui/wp.mashup.widgets.deploy/config/includes/wp.mwidgets.deploy_cfg.xml


Previous:
 

<wplc-edit-ear

        appname="websiteDisplayer"

        wasuser="${WasUserid}"
        waspassword="${WasPassword}"
        conntype="${wsadminConnType}">
        <option key="CtxRootForWebMod">
            <value>"WebsiteDisplayer" websiteDisplayer.war,WEB-INF/web.xml /${WpsContextRoot}/mcc${websiteDisplayer}</value>
        </option>
    </wplc-edit-ear>
    <antcall target="modify-iwidget-definition-context-root">
        <param name="IWidgetDefinition" value="/mcc${websiteDisplayer}/${htmlFragment}.xml"/>
        <param name="ContextRoot" value="${WpsContextRoot}"/>
    </antcall>


Desired:


<wplc-edit-ear

        appname="websiteDisplayer"

        wasuser="${WasUserid}"
        waspassword="${WasPassword}"
        conntype="${wsadminConnType}">
        <option key="CtxRootForWebMod">
            <value>"WebsiteDisplayer" websiteDisplayer_v201.war,WEB-INF/web.xml /${WpsContextRoot}/mcc${websiteDisplayer}</value>
        </option>
    </wplc-edit-ear>
    <antcall target="modify-iwidget-definition-context-root">
        <param name="IWidgetDefinition" value="/mcc${websiteDisplayer}/${htmlFragment}.xml"/>
        <param name="ContextRoot" value="${WpsContextRoot}"/>
    </antcall>