grouper-users - Re: [grouper-users] identifierAttributes in sources.xml
Subject: Grouper Users - Open Discussion List
List archive
- From: Scott Koranda <>
- To: Chris Hyzer <>
- Cc: grouper-users <>
- Subject: Re: [grouper-users] identifierAttributes in sources.xml
- Date: Sat, 1 Sep 2012 20:13:53 -0500
Hi,
> So, you configure your attributes based on columns. Some of
> the attributes need to be used as "identifiers" in the
> findByIdentifier queries. e.g. your netId, or eppn would be
> identifiers. Generally everything except the opaque ID. So
> you comma separate those attributes which are identifiers in
> the value of the XML element. ok? :)
>
Thanks. I understand but I am having trouble getting it
working.
I am using the Grouper API 2.1.2.
I have identifierAttributes defined in sources.xml as
<init-param>
<param-name>identifierAttributes</param-name>
<param-value>loginid1,loginid2,loginid3,loginid4,loginid5</param-value>
</init-param>
and I have this search defined:
<searchType>searchSubjectByIdentifier</searchType>
<param>
<param-name>sql</param-name>
<param-value>
SELECT
id,name,lfname,description,loginid1,loginid2,loginid3,loginid4,loginid5,email1,email2,email3,email4,email5
FROM
cm_grouper_subjects
WHERE
{inclause}
</param-value>
</param>
<param>
<param-name>inclause</param-name>
<param-value>
((loginid1 = ?) OR (loginid2 = ?) OR (loginid3 = ?) OR (loginid4 = ?) OR
(loginid5 = ?))
</param-value>
</param>
</search>
<search>
Consider the subject with id = 3:
gsh 1% s = findSubject("3")
subject: id='3' type='person' source='jdbc' name='Albert Lazzarini'
gsh 2% s.getAttributes()
edu.internet2.middleware.subject.SubjectCaseInsensitiveMapImpl:
{lfname=[Lazzarini,Albert],
loginid1=[],
loginid2=[],
loginid3=[],
loginid4=[], loginid5=[],
email1=[],
email2=[],
email3=[],
email4=[], email5=[]}
I can find the subject using loginid1:
gsh 3%
findSubject("")
subject: id='3' type='person' source='jdbc' name='Albert Lazzarini'
I cannot, however, find the subject using loginid2:
gsh 4%
findSubject("")
// Error: unable to evaluate command: Sourced file: inline
evaluation of:
``findSubject("");''
: Error
invoking compiled command: : Error in compiled command:
edu.internet2.middleware.subject.InvalidQueryException: Why
is this subject not able to be referenced by id or
identifier (do you need to add identifierAttributes to your
sources.xml???) Subject id: 3, sourceId: jdbc
What have I done wrong?
Thanks,
Scott
- Re: [grouper-users] identifierAttributes in sources.xml, Scott Koranda, 09/01/2012
- Message not available
- RE: [grouper-users] identifierAttributes in sources.xml, Chris Hyzer, 09/10/2012
- Re: [grouper-users] identifierAttributes in sources.xml, Scott Koranda, 09/10/2012
- RE: [grouper-users] identifierAttributes in sources.xml, Chris Hyzer, 09/10/2012
- Message not available
Archive powered by MHonArc 2.6.16.