Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Subject/Member question.

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Subject/Member question.


Chronological Thread 
  • From: Michael McManaman <>
  • To: Shilen Patel <>, "" <>
  • Subject: Re: [grouper-users] Subject/Member question.
  • Date: Wed, 28 Sep 2016 16:20:17 -0400
  • Ironport-phdr: 9a23:0LceyBxFdfEa4+bXCy+O+j09IxM/srCxBDY+r6Qd0e8QIJqq85mqBkHD//Il1AaPBtqLra8fwLOL+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6aijSI4DUTAhTyMxZubqSwQ9aKzpf/6+fnwJ3SZwhOzAK0fb52ZEGtrQTVu88+jZZhJ+A8xgaf5jMCdP5R2HtlPxeOhBvm/e+x+oJu6SJdp6hn+sJdG+2ucL4/UKRVFnE7KG0v/+XqswXOVw2C+iFaX2kLxElmGQ/AuTT7VZf4vy+yk+FY0S+TOMTwBeQxVjH9x612RhHhjCBBOjIkpjKEwvdshb5W9Ury7yd0xJTZNcTMbKJz

Hi -

2 questions...

What's the purpose of the useInClauseForIdAndIdentifier and the {inclause} in the sql to be executed for the source searches?

I have it in the first 2 queries (searchSubject & searchSubjectByIdentifier) and am not sure what the 'bigger picture' as in why they are used.


And 2nd Question - for the 3rd query  <searchType>search</searchType>, if I execute sql that doesn't include {inclause} I get errors like (in gsh):

Invalid column index, maybe not enough question marks (bind variables) are in query, or the number of question marks in the query is not the same as the number of parameters (might need to set the optional param numParameters), or the param 'numParameters' in sources.xml for that query is incorrect

what parameters is grouper (gsh, etc) feeding to this third query?

The example makes use of an sql 'like' keyword, leading me to guess the parameter will be partial names, regex, etc?

Is the inclause needed if useInClauseForIdAndIdentifier is set to 'true'?



Basically I have 2 tables that I can join that can return all the needed source properties identified in the sources.xml -  id, name, lfname, loginid and description.

I have the correct sql (when run in sqlplus) that returns the correct columns,I'm just not making the leap form the sql quieries to what needs to be in sources.xml.


Any help on this would be appreciated.

Mike 





On 09/27/2016 06:21 PM, Shilen Patel wrote:
Looks like that example in the wiki is outdated.  You probably want to use the example in the sources.xml file as a starting point.  And you can configure the third query to search on whatever makes sense for your environment.   So not an issue to exclude description.

Thanks!

- Shilen

On 9/27/16, 4:52 PM, "Michael McManaman" <> wrote:

Hi Shilen,

I've been following the documentation in the link you posted -

I've got grouper reading the sources file, but i'm getting errors such
as this -

Subject API error: error with subject source id: jdbc, name: Example
JDBC Source Adapter, problem with getSubject by id, in sources.xml:
search searchSubject: ,
edu.internet2.middleware.subject.SourceUnavailableException: Why are
there parameters in the sql? jdbc

In the doc, under the subject heading  'Configuring a JDBC subject
source adaptor 1 - a GrouperJdbcSourceAdapter' - there is an example
data source against a C3p0JdbcConnectionProvider connection (only we're
using oracle) and my question, and i think the cause of my problem is,
for the 3 queries that are defined for the subject source, I can match
up the first 2 examples to queries i can run against our database to
retrieve an id, name and description, but the 3rd query i'm not sure how
to go about this. Is grouper looking for 3 variables (the '?'s) to pass
into the query before executing?

The description variable for our database isn't a viable column to
search on so at best a wildcard search on id and name are the only options.

I'm wondering if the whittled down example, if followed exactly (except
for sql content) leads to a non functional source adapter


Thanks,
Mike


On 09/23/2016 09:10 AM, Shilen Patel wrote:
First you probably want to configure the sources.xml file to point to your
database and confirm that it works with grouper (e.g. gsh) if you haven't
done that already.  It's probably best to look at the examples in the file
and modify them to work for your database.  Here's some documentation
while.  Here's a high level description/diagrams/videos -
examples and ask questions here.

Thanks!

- Shilen

On 9/22/16, 2:36 PM, "Michael McManaman" <> wrote:

Thanks Shilen!

Can you point me to the documentation on how to set up the psp (?) to
use the sources.xml for finding subject sources?

I'm a bit fuzzy on how this part of grouper would work, and i'm probably
missing the docs in the wiki.

Thanks again for your help!

Mike



On 09/21/2016 03:16 PM, Shilen Patel wrote:
The subject table doesn't have to be populated.  In fact, it's mainly
for
the quickstart and running tests.

Rather, you should be using the sources.xml file to configure your
subject
source(s).  Both ldap and jdbc are supported by default.  So Grouper
basically looks at your existing database table to find people.

Thanks!

- Shilen

On 9/21/16, 1:59 PM, "Michael McManaman" <> wrote:

We have a database table populated with user names and user IDs.

is is possible to use a loadergroup to run an sql query that populates
the subject list in grouper?

I've been using gsh scripts with thousands of addSubject() lines -
where
each line corresponds to a database record.

This just seems a bit cumbersome and a scheduled loadergroup seems more
practical?


also - is it possible from the grouper UI to see/edit the list of
subjects (or users, group members or whatever they're called)


Thanks

Mike








Archive powered by MHonArc 2.6.19.

Top of Page