Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
TE Super Contributor.
Super Contributor.
529 views

Google Match on Custom Attribute


This is in version 4.1.1.0 of the Google Driver.

I need to be able to match users on a custom attribute in Google. The
attributes were given to me as follows:
customSchemas.EmployeeData.EID
customSchemas.StudentData.id

There are two GCV's that seem to involve specification for custom
attributes. The first, under Driver Parameters/Driver Options says
this;
Please specify the custom schema name for use with any user defined
fields (custom fields). See documentation for more information.
There is not much to see in the documentation. I was not able to figure
out just what value goes in here. No matter what I put in, the driver
would not recognize it. Sometimes, to the point of crashing the driver
on startup.

The second GCV is in the GCVs under Google Config. I used the values EID
and id. If I put in anything with a period, the driver would not start.
These two values do show up in the application schema and are mapped to
eDir attributes.

When I used the eDir attribute in a Find Matching Object, it all works
as expected until it gets to Google;


Code:
--------------------

[11/03/15 09:46:12.685]:XXXXGoogle ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.1.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<query class-name="UserEntry" event-id="0" scope="subtree">
<search-class class-name="UserEntry"/>
<search-attr attr-name="id">
<value timestamp="1440615527#102" type="string">638755</value>
</search-attr>
<read-attr/>
</query>
</input>
</nds>
[11/03/15 09:46:12.685]:XXXXGoogle ST: connect
[11/03/15 09:46:12.685]:XXXXGoogle ST: dispatch
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: association == null
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: class-name == 'UserEntry'
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: dest-dn == null
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: event-id == '0'
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: max-result-count == 2147483647
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: qualified-src-dn == null
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: scope == 'subtree'
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: src-dn == null
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: src-entry-id == null
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: search-attr: id. Value = 638755
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: contains query token? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: contains read attrs? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: contains search attrs? true
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: contains search classes? true
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: has entry scope? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: has subordinates scope? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: has subtree scope? true
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: has limited results? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: has unlimited results? true
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: has root base object? true
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: is cancelled query? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: is extended query? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: is identity query? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: is initial query? true
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: is subsequent query? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: should read attrs? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: should read parent? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: queryHandler: should search all classes? false
[11/03/15 09:46:12.685]:XXXXGoogle ST: Processing search criteria
[11/03/15 09:46:12.685]:XXXXGoogle ST: Query for User object
[11/03/15 09:46:12.700]:XXXXGoogle ST: Search Attribute: id
[11/03/15 09:46:12.700]:XXXXGoogle ST: Association: null
[11/03/15 09:46:12.700]:XXXXGoogle ST: GMailDriver queryHandler(): search-attr = id
[11/03/15 09:46:12.700]:XXXXGoogle ST: GMailDriver queryHandler(): search value == '638755'
[11/03/15 09:46:12.700]:XXXXGoogle ST: DirectoryAppClient.retrieveUsers(): Domain = null; Query String = id:'638755'
[11/03/15 09:46:12.700]:XXXXGoogle ST: DirectoryAppClient.retrieveUsers(): No domain specified. Using default = xxxxxxx.net
[11/03/15 09:46:12.810]:XXXXGoogle ST: handleGoogleJsonResponseException(): Error code: 400
[11/03/15 09:46:12.810]:XXXXGoogle ST: handleGoogleJsonResponseException(): Error message: Invalid Input: id:'638755'
[11/03/15 09:46:12.810]:XXXXGoogle ST: handleGoogleJsonResponseException(): Error Reason: invalid
[11/03/15 09:46:12.810]:XXXXGoogle ST: There are 30 stack frame elements
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1056)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.driver.gmailshim.DirectoryAppClient.retrieveUsers(DirectoryAppClient.java:2524)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.driver.gmailshim.CommonImpl.queryHandler(CommonImpl.java:2533)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.driver.gmailshim.GMailSubscriptionShim.dispatch(GMailSubscriptionShim.java:644)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.driver.gmailshim.GMailSubscriptionShim.execute(GMailSubscriptionShim.java:489)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.Subscriber.execute(Subscriber.java:455)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.Subscriber.execute(Subscriber.java:289)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.Subscriber$SubscriberAppQueryProcessor.query(Subscriber.java:2171)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.driver.XdsQueryProcessor.query(XdsQueryProcessor.java:84)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.rules.DoFindMatchingObject.apply(DoFindMatchingObject.java:177)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.rules.ActionSet.apply(ActionSet.java:180)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.rules.DirXMLScriptProcessor.applyRules(DirXMLScriptProcessor.java:307)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.rules.DirXMLScriptProcessor.applyRules(DirXMLScriptProcessor.java:429)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.Subscriber$AddProcessor.process(Subscriber.java:1352)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.Subscriber$ModifyProcessor.process(Subscriber.java:1562)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.Subscriber.processEvent(Subscriber.java:1136)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.Subscriber.processEvents(Subscriber.java:953)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.Driver.submitTransaction(Driver.java:764)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.DriverEntry.submitTransaction(DriverEntry.java:1128)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.DriverEntry.processCachedTransaction(DriverEntry.java:1012)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.DriverEntry.eventLoop(DriverEntry.java:820)
[11/03/15 09:46:12.810]:XXXXGoogle ST: com.novell.nds.dirxml.engine.DriverEntry.run(DriverEntry.java:597)
[11/03/15 09:46:12.810]:XXXXGoogle ST: java.lang.Thread.run(Thread.java:745)
[11/03/15 09:46:12.810]:XXXXGoogle ST: SubscriptionShim.execute() returned:
[11/03/15 09:46:12.810]:XXXXGoogle ST:

--------------------


First problem is how to validate the attribute really exists in Google.
Second, finding if it is on any user. Third, why is it failing doing a
query?


--
tse7147
------------------------------------------------------------------------
tse7147's Profile: https://forums.netiq.com/member.php?userid=466
View this thread: https://forums.netiq.com/showthread.php?t=54581

Labels (1)
0 Likes
3 Replies
TE Super Contributor.
Super Contributor.

Re: Google Match on Custom Attribute


Some updated information regarding this issue.

I have determined the immediate problem is we are searching for a user
in a SubDomain, and the query is defaulting to the primary Domain. So I
have tried various ways to put in the SubDomain value (i.e. Destination
DN for one) but nothing seems to change the assumption the shim is
doing. I am searching subtree. I validated this by putting in a user
in the primary domain and searching for them. There is only 1 Google
setup for us to use, so all DEV users are going into two previously
unused SubDomains. This has to work as in PROD, 2/3s of the users are
also in a SubDomain.

Ok, back to the issue. Searching the primary domain by default sorta
worked. The user was found based on the Custom Schema attribute value,
but the shim immediately threw and exception.

Code:
--------------------

<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.1.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<query class-name="UserEntry" dest-dn="hs.xxxxxisd.net" event-id="0" scope="subtree">
<search-class class-name="UserEntry"/>
<search-attr attr-name="StudentData.id">
<value timestamp="1446755459#1" type="string">888999</value>
</search-attr>
<read-attr/>
</query>
</input>
</nds>
[11/05/15 14:32:44.818]:XXXXGoogle ST: connect
[11/05/15 14:32:44.818]:XXXXGoogle ST: dispatch
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: association == null
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: class-name == 'UserEntry'
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: dest-dn == hs.xxxxxisd.net
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: event-id == '0'
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: max-result-count == 2147483647
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: qualified-src-dn == null
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: scope == 'subtree'
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: src-dn == null
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: src-entry-id == null
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: search-attr: StudentData.id. Value = 888999
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: contains query token? false
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: contains read attrs? false
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: contains search attrs? true
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: contains search classes? true
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: has entry scope? false
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: has subordinates scope? false
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: has subtree scope? true
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: has limited results? false
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: has unlimited results? true
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: has root base object? false
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: is cancelled query? false
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: is extended query? false
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: is identity query? false
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: is initial query? true
[11/05/15 14:32:44.818]:XXXXGoogle ST: queryHandler: is subsequent query? false
[11/05/15 14:32:44.834]:XXXXGoogle ST: queryHandler: should read attrs? false
[11/05/15 14:32:44.834]:XXXXGoogle ST: queryHandler: should read parent? false
[11/05/15 14:32:44.834]:XXXXGoogle ST: queryHandler: should search all classes? false
[11/05/15 14:32:44.834]:XXXXGoogle ST: Processing search criteria
[11/05/15 14:32:44.834]:XXXXGoogle ST: Query for User object
[11/05/15 14:32:44.834]:XXXXGoogle ST: Search Attribute: StudentData.id
[11/05/15 14:32:44.834]:XXXXGoogle ST: Association: null
[11/05/15 14:32:44.834]:XXXXGoogle ST: GMailDriver queryHandler(): search-attr = StudentData.id
[11/05/15 14:32:44.834]:XXXXGoogle ST: GMailDriver queryHandler(): search value == '888999'
[11/05/15 14:32:44.834]:XXXXGoogle ST: DirectoryAppClient.retrieveUsers(): Domain = null; Query String = studentdata.id:'888999'
[11/05/15 14:32:44.834]:XXXXGoogle ST: DirectoryAppClient.retrieveUsers(): No domain specified. Using default = xxxxxisd.net
[11/05/15 14:32:45.240]:XXXXGoogle ST: DirectoryAppClient.retrieveUsers(): DEBUG Users.toString(){"etag":"\"KuAr0EK1uUI7oJNfO_dWOREN2ro/b-Uq3jQ6XiAikcZ2hu7TUyi98k0\"","kind":"admin#directory#users","users":[{"agreedToTerms":true,"changePasswordAtNextLogin":true,"creationTime":"2015-11-05T20:21:46.000Z","customSchemas":{"StudentData":{"id":"888999"}},"customerId":"C00znepmh","emails":[{"address":"xtub9990@xxxxxisd.net","primary":true}],"etag":"\"KuAr0EK1uUI7oJNfO_dWOREN2ro/nIFX0mDJ9Vo1FwBRDnw8AErbMZg\"","id":"103143321537550146289","includeInGlobalAddressList":true,"ipWhitelisted":false,"isAdmin":false,"isDelegatedAdmin":false,"isMailboxSetup":true,"kind":"admin#directory#user","lastLoginTime":"1970-01-01T00:00:00.000Z","name":{"familyName":"Tuba","fullName":"Xylophone Tuba","givenName":"Xylophone"},"nonEditableAliases":["xtub9990@xxxxxisd.net.test-google-a.com"],"orgUnitPath":"/IDM-DEV/Students-DEV","primaryEmail":"xtub9990@xxxxxisd.net","suspended":false}]}
[11/05/15 14:32:45.240]:XXXXGoogle ST: DirectoryAppClient.retrieveUsers(): Page of users 1
[11/05/15 14:32:45.240]:XXXXGoogle ST: GMailDriver queryHandler(): query returned 1 results
[11/05/15 14:32:45.240]:XXXXGoogle ST: Generating query results for multiple users
[11/05/15 14:32:45.240]:XXXXGoogle ST: addUserResult prologue
[11/05/15 14:32:45.240]:XXXXGoogle ST: addUserResult(): HTTP Reason: com.google.api.client.util.ArrayMap cannot be cast to java.util.HashMap
[11/05/15 14:32:45.240]:XXXXGoogle ST: SubscriptionShim.execute() returned:
[11/05/15 14:32:45.240]:XXXXGoogle ST:
<nds dtdversion="3.0">
<source>
<product build="20150909_2033" instance="XXXX_Google" version="4.1.1.0">GoogleApps Driver</product>
<contact>NetIQ Corporation</contact>
</source>
<output>
<instance class-name="UserEntry" src-dn="/IDM-DEV/Students-DEV/xtub9990@xxxxxisd.net">
<association>xtub9990@xxxxxisd.net</association>
</instance>
<status event-id="'0'" level="error" type="driver-status">
<description>Exception: java.lang.ClassCastException: com.google.api.client.util.ArrayMap cannot be cast to java.util.HashMap</description>
<exception class-name="java.lang.ClassCastException">
<message>com.google.api.client.util.ArrayMap cannot be cast to java.util.HashMap</message>
<stack-trace>java.lang.ClassCastException: com.google.api.client.util.ArrayMap cannot be cast to java.util.HashMap
at com.novell.nds.dirxml.driver.gmailshim.CommonImpl.addUserResult(CommonImpl.java:5025)
at com.novell.nds.dirxml.driver.gmailshim.CommonImpl.queryHandler(CommonImpl.java:2552)
at com.novell.nds.dirxml.driver.gmailshim.GMailSubscriptionShim.dispatch(GMailSubscriptionShim.java:644)
at com.novell.nds.dirxml.driver.gmailshim.GMailSubscriptionShim.execute(GMailSubscriptionShim.java:489)
at com.novell.nds.dirxml.engine.Subscriber.execute(Subscriber.java:455)
at com.novell.nds.dirxml.engine.Subscriber.execute(Subscriber.java:289)
at com.novell.nds.dirxml.engine.Subscriber$SubscriberAppQueryProcessor.query(Subscriber.java:2171)
at com.novell.nds.dirxml.driver.XdsQueryProcessor.query(XdsQueryProcessor.java:84)
at com.novell.nds.dirxml.engine.rules.DoFindMatchingObject.apply(DoFindMatchingObject.java:177)
at com.novell.nds.dirxml.engine.rules.ActionSet.apply(ActionSet.java:180)
at com.novell.nds.dirxml.engine.rules.DirXMLScriptProcessor.applyRules(DirXMLScriptProcessor.java:307)
at com.novell.nds.dirxml.engine.rules.DirXMLScriptProcessor.applyRules(DirXMLScriptProcessor.java:429)
at com.novell.nds.dirxml.engine.Subscriber$AddProcessor.process(Subscriber.java:1352)
at com.novell.nds.dirxml.engine.Subscriber$ModifyProcessor.process(Subscriber.java:1562)
at com.novell.nds.dirxml.engine.Subscriber.processEvent(Subscriber.java:1136)
at com.novell.nds.dirxml.engine.Subscriber.processEvents(Subscriber.java:953)
at com.novell.nds.dirxml.engine.Driver.submitTransaction(Driver.java:764)
at com.novell.nds.dirxml.engine.DriverEntry.submitTransaction(DriverEntry.java:1128)
at com.novell.nds.dirxml.engine.DriverEntry.processCachedTransaction(DriverEntry.java:1012)
at com.novell.nds.dirxml.engine.DriverEntry.eventLoop(DriverEntry.java:820)
at com.novell.nds.dirxml.engine.DriverEntry.run(DriverEntry.java:597)
at java.lang.Thread.run(Thread.java:745)
</stack-trace>
</exception>
</status>
</output>
</nds>

--------------------


--
tse7147
------------------------------------------------------------------------
tse7147's Profile: https://forums.netiq.com/member.php?userid=466
View this thread: https://forums.netiq.com/showthread.php?t=54581

0 Likes
TE Super Contributor.
Super Contributor.

Re: Google Match on Custom Attribute


So, now the question is, how do you get the search domain into the
query using the Query Token or Find Matching Object Token?


--
tse7147
------------------------------------------------------------------------
tse7147's Profile: https://forums.netiq.com/member.php?userid=466
View this thread: https://forums.netiq.com/showthread.php?t=54581

0 Likes
Highlighted
dsouthard Contributor.
Contributor.

Re: Google Match on Custom Attribute

Did you ever determine the answer?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.