grouper-users - [grouper-users] RE: Configure attributes for Grouper-WS calls
Subject: Grouper Users - Open Discussion List
List archive
- From: "Klug, Lawrence" <>
- To: Chris Hyzer <>, "Schreiber, Bernard" <>, "" <>
- Subject: [grouper-users] RE: Configure attributes for Grouper-WS calls
- Date: Mon, 8 Oct 2012 18:03:07 +0000
- Accept-language: en-US
Thanks Chris, we’ll give it a try. From: Chris Hyzer [mailto:]
I just tried this in our test system and it worked fine: ws.subject.result.attribute.names = PENNNAME, EMAIL [mchyzer@flash pennGroupsClient-2.0.0]$ java -jar grouperClient.jar --operation=getSubjectsWs --pennKeys=mchyzer --debug=true ################ REQUEST START (indented) ############### POST /grouperWs/servicesRest/v2_0_000/subjects HTTP/1.1 Connection: close Authorization: Basic xxxxxxxxxxxxxxxx User-Agent: Jakarta Commons-HttpClient/3.1 Host: medley-test03.isc-seo.upenn.edu:-1 Content-Length: 171 Content-Type: text/xml; charset=UTF-8 <WsRestGetSubjectsRequest> <wsSubjectLookups> <WsSubjectLookup> <subjectIdentifier>mchyzer</subjectIdentifier> </WsSubjectLookup> </wsSubjectLookups> </WsRestGetSubjectsRequest> ################ REQUEST END ############### ################ RESPONSE START (indented) ############### HTTP/1.1 200 OK Date: Mon, 08 Oct 2012 18:01:06 GMT Server: Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8o proxy_html/3.1.2 mod_jk/1.2.31 PHP/5.2.17 Set-Cookie: JSESSIONID=xxxxxxxxxxxx; Secure X-Grouper-resultCode: SUCCESS X-Grouper-success: T X-Grouper-resultCode2: NONE Vary: Accept-Encoding Content-Length: 728 Connection: close Content-Type: text/xml;charset=UTF-8 <WsGetSubjectsResults> <subjectAttributeNames> <string>PENNNAME</string> <string>EMAIL</string> </subjectAttributeNames> <wsSubjects> <WsSubject> <identifierLookup>mchyzer</identifierLookup> <resultCode>SUCCESS</resultCode> <success>T</success> <id>10021368</id> <name>Michael Christopher Hyzer</name> <sourceId>pennperson</sourceId> <attributeValues> <string>mchyzer</string> <string>> </attributeValues> </WsSubject> </wsSubjects> <resultMetadata> <resultCode>SUCCESS</resultCode> <resultMessage>Queried 1 subjects</resultMessage> <success>T</success> </resultMetadata> <responseMetadata> <resultWarnings></resultWarnings> <millis>12088</millis> <serverVersion>2.1.1</serverVersion> </responseMetadata> </WsGetSubjectsResults> ################ RESPONSE END ############### From: Chris Hyzer
You should be able to set these in the grouper-ws.properties referencing attributes from the source.xml (note, maybe they have to be in all CAPS): # subject attribute names to send back when a WsSubjectResult is sent, comma separated # e.g. name, netid # default is none ws.subject.result.attribute.names =
# subject result attribute names when extended data is requested (comma separated) # default is name, description # note, these will be in addition to ws.subject.result.attribute.names ws.subject.result.detail.attribute.names =
The former is by default. The latter is when the called says they want subject details.
We aren’t using those right now, so hopefully it works. And callers should be able to request ones which aren’t there: [mchyzer@flash pennGroupsClient-2.0.0]$ java -jar grouperClient.jar --operation=getSubjectsWs --pennKeys=mchyzer --subjectAttributeNames=EMAIL,PENNNAME --debug=true DEBUG: Reading resource: grouper.client.properties, from: /home/mchyzer/grouper/pennGroupsClient-2.0.0/grouper.client.properties DEBUG: WebService: connecting as user: 'something/school.edu' DEBUG: WebService: connecting to URL: 'https://grouper.school.edu/grouperWs/servicesRest/v2_0_000/subjects' ################ REQUEST START (indented) ############### POST /grouperWs/servicesRest/v2_0_000/subjects HTTP/1.1 Connection: close Authorization: Basic xxxxxxxxxxxxxxxx User-Agent: Jakarta Commons-HttpClient/3.1 Host: medley.isc-seo.upenn.edu:-1 Content-Length: 265 Content-Type: text/xml; charset=UTF-8 <WsRestGetSubjectsRequest> <subjectAttributeNames> <string>EMAIL</string> <string>PENNNAME</string> </subjectAttributeNames> <wsSubjectLookups> <WsSubjectLookup> <subjectIdentifier>mchyzer</subjectIdentifier> </WsSubjectLookup> </wsSubjectLookups> </WsRestGetSubjectsRequest> ################ REQUEST END ############### ################ RESPONSE START (indented) ############### HTTP/1.1 200 OK Date: Mon, 08 Oct 2012 17:49:52 GMT Server: Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8o mod_jk/1.2.31 PHP/5.2.17 Set-Cookie: JSESSIONID=xxxxxxxxxxxx; Secure X-Grouper-resultCode: SUCCESS X-Grouper-success: T X-Grouper-resultCode2: NONE Vary: Accept-Encoding Content-Length: 727 Connection: close Content-Type: text/xml;charset=UTF-8 <WsGetSubjectsResults> <subjectAttributeNames> <string>EMAIL</string> <string>PENNNAME</string> </subjectAttributeNames> <wsSubjects> <WsSubject> <identifierLookup>mchyzer</identifierLookup> <resultCode>SUCCESS</resultCode> <success>T</success> <id>10021368</id> <name>Michael Christopher Hyzer</name> <sourceId>pennperson</sourceId> <attributeValues> <string>> <string>mchyzer</string> </attributeValues> </WsSubject> </wsSubjects> <resultMetadata> <resultCode>SUCCESS</resultCode> <resultMessage>Queried 1 subjects</resultMessage> <success>T</success> </resultMetadata> <responseMetadata> <resultWarnings></resultWarnings> <millis>1262</millis> <serverVersion>2.1.1</serverVersion> </responseMetadata> </WsGetSubjectsResults> ################ RESPONSE END ############### DEBUG: Output template: Index: ${index}: success: ${success}, code: ${wsSubject.resultCode}, subject: ${wsSubject.id} , available variables: wsGetSubjectsResults, grouperClientUtils, index, wsSubject, wsGroup, success Index: 0: success: T, code: SUCCESS, subject: 10021368 DEBUG: Elapsed time: 2238ms [mchyzer@flash pennGroupsClient-2.0.0]$ From: Schreiber, Bernard []
Information on how to do both would be great. For now all calls will need a custom login id and email address so definitely need to know how to configure it by default. From: Chris Hyzer [] You can do this by default, or only when the caller requests it. Which do you want? Thanks, Chris From:
[]
On Behalf Of Klug, Lawrence We want to configure grouper so that it returns specific attributes (for example, email address) using Grouper-WS REST calls. Does this require special config, because so far it’s not working for us. Thanks, Lawrence |
- [grouper-users] Configure attributes for Grouper-WS calls, Klug, Lawrence, 10/08/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Chris Hyzer, 10/08/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Klug, Lawrence, 10/08/2012
- Message not available
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Chris Hyzer, 10/08/2012
- Message not available
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Chris Hyzer, 10/08/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Klug, Lawrence, 10/08/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Klug, Lawrence, 10/08/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Chris Hyzer, 10/08/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Klug, Lawrence, 10/09/2012
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [grouper-users] FW: Configure attributes for Grouper-WS calls, Klug, Lawrence, 10/09/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Klug, Lawrence, 10/09/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Chris Hyzer, 10/08/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Chris Hyzer, 10/08/2012
- [grouper-users] RE: Configure attributes for Grouper-WS calls, Chris Hyzer, 10/08/2012
Archive powered by MHonArc 2.6.16.