r12.0 SP4: Can I search one single 'View' using any search filter I like?
search cancel

r12.0 SP4: Can I search one single 'View' using any search filter I like?

book

Article ID: 50895

calendar_today

Updated On:

Products

CA Directory CA Security Command Center CA Data Protection (DataMinder) CA User Activity Reporting

Issue/Introduction

Description:

In r12.0 SP4, there has been an enhancement to the 'Views' functionality that enables a user to query one single 'View' using any search filter that is required.

Solution:

In previous Service Packs of r12.0 CA Directory, the initial search filter attribute that is used to query a view was hard coded into the 'View' configuration itself. This was not practical for some implementations.

The enhancement to 'Views' provided in r12.0 Service Pack 4 is to add a new filter type called "from-client".

When specified, this means that the LDAP client application can query the same view using completely different search filters.

Configuring a View

The following is a very simple view configuration that illustrates the use of the new filter.

  set view "UserID" = {
  description = "Display list of channels for a given MACAddress"
  entry = <c AU><o Views><cn "UserID">
  (   phase = 1
      subtree = "o=Democorp,c=AU"
      filter = from-client
  )
 
  };

The above view is triggered when the virtual entry "cn=UserID, o=Views, c=AU" is searched.

The search filter supplied in the search operation will be used in the first phase of the 'View' search.

Testing a View

Submitting the DXsearch operation

  dxsearch -h aaa.bbb.ccc.ddd -p 20389 -s sub -b "cn=UserID,o=Views,c=AU" "(sn=Hanlen)"

Searches the virtual entry " cn=UserID, o=Views, c=AU ", and uses a search filter of " sn=Hanlen"

This results in the views configuration launching and searching the " o=Democorp,c=AU " subtree for " sn=Hanlen"

which displays the following output.

  # extended LDIF
  #
  # LDAPv3
  # base <cn=UserID,o=Views,c=AU> with scope subtree
  # filter: (sn=Hanlen)
  # requesting: ALL
  #
 
  # Candace Hanlen, Users, Democorp, AU
  dn: cn=Candace Hanlen,ou=Users,o=Democorp,c=AU
  cn: Candace Hanlen
  objectClass: inetOrgPerson
  objectClass: organizationalPerson
  objectClass: person
  objectClass: top
  sn: Hanlen
  dxSizeLimit: 11

To confirm that the DSA is processing the view correctly, tracing the DSA with "trace=all;" debug tracing shows the following:

  ! [52] Performing phase '1' view search subtree 'o=Democorp,c=AU' for view 'UserID'
  ! [52] 
  > [52] <- #1 CONSOLE SEARCH-REQ
  > [52]  invoke-id = 2   credit = 5
  > [52]     Base object:
  > [52]         <countryName "AU">
  > [52]         <organizationName "Democorp">
  > [52]     Search subset: Whole subtree
  > [52]     Filter:
  > [52]         surname = "Hanlen"
  > [52]  flags = IDU_FLAGS_VIEWS

Environment

Release:
Component: ETRDIR