Debugging Portal - Dynamic Service Attributes


Portal Server (PS) uses Access Manager (AM) features which in turn uses Directory Server (SunDS) features. One of such features of SunDS is Class Of Service or COS which is used by AM in Service Management System (SMS).
Portal defines services and registers these services into AM.
Some services are shared by multiple portals while some services are portal specific.
Shared services are:
    Rewriter
    SSO Adapter
    All Sercure Remote Access (SRA) related services

Portal specific services are shown below and have their names mangled with portal-id
    Desktop - SunPortalmyPortalDesktopService
    Subscriptions - SunPortal
myPortalSubscriptionsService

Most of these services use "Dynamic" type of attributes which are stored by AM using the COS feature. It means that these are virtual attributes and are not set at the node, but set into the COS template.
Many times we come across a situation while debugging portal, when we want to see the the value of such a COS attribute at a specific node. Looking at the node does not tell us if the value is set at the node or the value is being inherited.

For example, running the following query on a user shows this:

/opt/SUNWam/bin> ./ldapsearch -b 'o=EnterpriseSample,dc=red,dc=iplanet,dc=com'
-D "cn=Directory Manager" -w 11111111 "cn=u1"

version: 1
dn: uid=u1,ou=People,o=EnterpriseSample,dc=red,dc=iplanet,dc=com
sn: u1
cn: u1
uid: u1
...
sunPortalmyPortalDesktopCommunityCreateContainerName: CommunityCreatePortlet
sunPortalmyPortalDesktopCommunityHomeContainerName: CommunityHomeContainer
sunPortalmyPortalDesktopDefaultChannelName: JSPTabContainer
sunPortalmyPortalDesktopEditProviderContainerName: JSPEditContainer
sunPortalmyPortalDesktopType: enterprise_sample
sunPortalmyPortalMaxCategorySubscriptions: 5
sunPortalmyPortalMaxDiscussionSubscriptions: 5
sunPortalmyPortalMaxSavedSearch: 5

The COS feature of SunDS gives the attribute value as sunPortalmyPortalDesktopType=enterprise_sample which in this case is inherited from the parent organization.
If the user belongs to different roles, then it becomes even more complex to track down where the value is being inherited because it will be resolved using COS priority and if the priority is same then the value is indeterministic.

One easy way is to execute an ldapsearch like this and then parse through the dump to locate the template attribtues. This gets a bit cumbersome with a huge dump.

/opt/SUNWam/bin> ./ldapsearch -b 'o=EnterpriseSample,dc=red,dc=iplanet,dc=com'
-D "cn=Directory Manager" -w 11111111 "(objectclass=\*)"

Another easier way is to run a search on individual node templates.

To see the attribtues set for the organization template for desktop service, execute the search shown below. Notice that the base dn always has cn=ContainerDefaultTemplateRole for an organization and the name of the service is mangled with portal-id.

/opt/SUNWam/bin>./ldapsearch -b
'cn="cn=ContainerDefaultTemplateRole,o=EnterpriseSample,dc=red,dc=iplanet,dc=com",
cn=SunPortalmyPortalDesktopService,o=EnterpriseSample,dc=red,dc=iplanet,dc=com'
-D "cn=Directory Manager" -w 11111111 "(objectclass=\*)"


version: 1
dn: cn="cn=ContainerDefaultTemplateRole,o=EnterpriseSample,..."
cn: cn=ContainerDefaultTemplateRole,o=EnterpriseSample,dc=red,dc=iplanet,dc=com
objectClass: costemplate
objectClass: top
objectClass: extensibleObject
sunPortalmyPortalDesktopEditProviderContainerName: JSPEditContainer
sunportaldesktopdpcanview: true
cosPriority: 0
sunportaldesktopdpdocument:: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgi
IHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBEaXNwbGF5UHJvZmlsZSBTWVNURU0gImphcjov
...
...

ZSIgbG9jaz0iZmFsc2UiIG1lcmdlPSJmdXNlIiBuYW1lPSJfcm9vdCIgcHJpb3JpdHk9IjEwIiB2
sunportaldesktopdplastmodified: 1184692202155
sunPortalmyPortalDesktopCommunityHomeContainerName: CommunityHomeContainer
sunPortalmyPortalDesktopDefaultChannelName: JSPTabContainer
sunPortalmyPortalDesktopCommunityCreateContainerName: CommunityCreatePortlet
sunPortalmyPortalDesktopType: enterprise_sample

To look at the role nodes, following search can be used. Notice here that the base dn starts with cn="cn=RoleName... and also has portal qualified desktop service name.

/opt/SUNWam/bin> ./ldapsearch -b 'cn="cn=AustraliaExpansionRole,o=EnterpriseSample,dc=red,dc=iplanet,dc=com",
cn=SunPortalmyPortalDesktopService,o=EnterpriseSample,dc=red,dc=iplanet,dc=com'

-D "cn=Directory Manager"
-w 11111111 "(objectclass=\*)"


version: 1
dn:
cn="cn=AustraliaExpansionRole,o=EnterpriseSample,dc=red,dc=iplanet,dc=com"
,cn=SunPortalmyPortalDesktopService,o=EnterpriseSample,dc=red,dc=iplanet,dc=
com
cn: "cn=AustraliaExpansionRole,o=EnterpriseSample,dc=red,dc=iplanet,dc=com"
cn: cn=AustraliaExpansionRole,o=EnterpriseSample,dc=red,dc=iplanet,dc=com
objectClass: costemplate
objectClass: top
objectClass: extensibleObject
sunPortalmyPortalDesktopEditProviderContainerName: JSPEditContainer
sunportaldesktopdpcanview: true
cosPriority: 0
sunPortalmyPortalDesktopDefaultChannelName: JSPTabContainer
sunPortalmyPortalDesktopType: enterprise_sample
sunportaldesktopdpdocument:: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgi
IHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBEaXNwbGF5UHJvZmlsZSBTWVNURU0gImphcjov
...
...
dmlkZXJzPgogICAgPC9Qcm92aWRlcnM+CjwvRGlzcGxheVByb2ZpbGU+Cg==
sunportaldesktopdplastmodified: 1184692031309

And the easiest way is of course using an ldapbrowser.
First select the organization node in the Explore tab on the left and then set the quick search bar to
"cn=ContainerDefaultTemplateRole,o=EnterpriseSample,dc=red,dc=iplanet,dc=com"
and click "Quick Search"


Then select the ContainerDefaultTemplateRole under a service in Results tab, to see the dynamic service attributes set for the organization, on the right.

 

Change the name from ContainerDefaultTemplateRole to any other role name to see dynamic attributes at the role node.

Happy Debugging...

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Prashant Dighe

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today