Skip to Content.
Sympa Menu

grouper-users - some faq's

Subject: Grouper Users - Open Discussion List

List archive

some faq's


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Grouper Users Mailing List <>
  • Subject: some faq's
  • Date: Wed, 25 Mar 2009 00:38:15 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

Here are some questions about grouper which I have answered for Penn and posted to the wiki:
 
  • How can I return pennnames/pennkeys from the web service via grouper client?  (note: pennname/pennkey is the subjectIdentifier at Penn, this is a text based login, not the numeric subjectId)
First your web service's sources.xml needs to return the subject attribute.  I had to make a column in my jdbc source of PENNNAME (Oracle jdbc metadata makes this always UPPER)
You can specify to return pennnames as the subject attributes, and you can use them in your output template:
C:\temp>java -jar grouperClient.jar --operation=getMembersWs --groupNames=test:testGroup --subjectAttributeNames=PENNNAME --outputTemplate=${wsSubject.attributeValues[0]}$newline$
bwh
mchyzer
BTW: you can show this on the UI in the custom/media.properties entry: subject.attributes.order.pennperson=name,description,subjectType,id,PENNNAME
  • How can I query based on pennkey from the web service? (again pennkey is Penn's subject identifier)
First you need to understand that in the grouper.client.properties file you can mask "subjectId" and "subjectIdentifier" with terms used at your institution.  So you have custom commands.  For Penn we can do:
You can use the built in pennkey support in Penn's grouper client (needs custom configuration over the generic Grouper download):
C:\temp>java -jar grouperClient.jar --operation=hasMemberWs --groupName=test:testGroup --pennKeys=mchyzer,bwh
Index 0: success: T: code: IS_MEMBER: 10099999: true
Index 1: success: T: code: IS_MEMBER: 10099998: true
This is due to our grouper.client.properties settings:
#note: you will see documentation in the grouper.client.example.properties
grouperClient.alias.subjectIds = pennIds
grouperClient.alias.subjectIdentifiers = pennKeys
grouperClient.alias.subjectId = pennId
grouperClient.alias.subjectIdentifier = pennKey
grouperClient.alias.SubjectId = PennId
grouperClient.alias.SubjectIdentifier = PennKey
If you didnt have this customization, you can simply look by subject identifier:
C:\temp>java -jar grouperClient.jar --operation=hasMemberWs --groupName=test:testGroup --subjectIdentifiers=mchyzer,bwh
Index 0: success: T: code: IS_MEMBER: 10099999: true
Index 1: success: T: code: IS_MEMBER: 10099998: true
  • How can I make a group which has a manual membership list and requires users to be faculty student or staff?
First off, you need permission to view the facultyStudentStaff group, if it is not public. Note, the composite arguments shouldnt be necessary, but until it is fixed, use them and it will work. This makes a group, a system of record group (where the manual entries go), and the overall group is a composite intersection of the manual group and the facultyStudentStaff group.  Note, you need to enable "requireGroups" in your grouper.properties
C:\temp>java -jar grouperClient.jar --operation=groupSaveWs --name=test:isc:astt:chris:myGroup --includeGroupDetail=true --description="test group with requiring active facultyStudentStaff" --displayExtension="My test group" --attributeName0=requireAlsoInGroups --attributeValue0=penn:somewhere:facultyStudentStaff --typeNames=requireInGroups --compositeType=INTERSECTION --leftGroupName=test:isc:astt:chris:myGroup_systemOfRecord --rightGroupName=penn:somewhere:facultyStudentStaff
Success: T: code: SUCCESS_INSERTED: test:isc:astt:chris:myGroup
 
 
Here is the SOAP equivalent:
 
<?xml version='1.0' encoding='UTF-8'?>
  <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
    <soapenv:Body>
      <ns1:groupSave xmlns:ns1="http://soap.ws.grouper.middleware.internet2.edu/xsd">
        <ns1:clientVersion>v1_4_002</ns1:clientVersion>
        <ns1:wsGroupToSaves>
          <ns1:wsGroup>
            <ns1:description>
              test group with requiring active facultyStudentStaff
            </ns1:description>
            <ns1:detail>
              <ns1:attributeNames>requireAlsoInGroups</ns1:attributeNames>
              <ns1:attributeValues>penn:community:facultyStudentStaff</ns1:attributeValues>
              <ns1:compositeType>intersection</ns1:compositeType>
              <ns1:hasComposite>T</ns1:hasComposite>
              <ns1:leftGroup>
                <ns1:description></ns1:description>
                <ns1:displayExtension></ns1:displayExtension>
                <ns1:displayName></ns1:displayName>
                <ns1:extension></ns1:extension>
                <ns1:name>penn:community:facultyStudentStaff</ns1:name>
                <ns1:uuid></ns1:uuid>
              </ns1:leftGroup>
              <ns1:rightGroup>
                <ns1:description></ns1:description>
                <ns1:displayExtension></ns1:displayExtension>
                <ns1:displayName></ns1:displayName>
                <ns1:extension></ns1:extension>
                <ns1:name>test:isc:astt:chris:myGroup_systemOfRecord</ns1:name>
                <ns1:uuid></ns1:uuid>
              </ns1:rightGroup>
              <ns1:typeNames>requireInGroups</ns1:typeNames>
            </ns1:detail>
            <ns1:displayExtension>My test group</ns1:displayExtension>
            <ns1:extension>myGroup</ns1:extension>
            <ns1:name>test:isc:astt:chris:myGroup</ns1:name>
          </ns1:wsGroup>
          <ns1:wsGroupLookup>
            <ns1:groupName>test:isc:astt:chris:myGroup</ns1:groupName>
          </ns1:wsGroupLookup>
        </ns1:wsGroupToSaves>
        <ns1:actAsSubjectLookup>
          <ns1:subjectId></ns1:subjectId>
        </ns1:actAsSubjectLookup>
        <ns1:txType></ns1:txType>
        <ns1:includeGroupDetail>T</ns1:includeGroupDetail>
      </ns1:groupSave>
    </soapenv:Body>
  </soapenv:Envelope>
 
 


  • some faq's, Chris Hyzer, 03/25/2009

Archive powered by MHonArc 2.6.16.

Top of Page