Skip to Content.
Sympa Menu

grouper-users - [grouper-users] Grouper Voot Connector

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] Grouper Voot Connector


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Benn Oshrin <>, "" <>
  • Cc: Maarten Kremers <>, Jim Fox <>, Scotty Logan <>
  • Subject: [grouper-users] Grouper Voot Connector
  • Date: Thu, 4 Oct 2012 23:20:46 +0000
  • Accept-language: en-US

Here is a Grouper Voot Connector:

 

https://spaces.internet2.edu/display/Grouper/Grouper+Voot+Connector

 

Let me know if anyone wants to use this and/or evolve it improve it...  Note: there wasn’t any discussion about how it should work, just read the spec and implemented, so it is experimental until someone can verify that it works as the spec intended… J

 

Thanks

Chris

 

The Grouper Voot Connector is a jar plugin for the Grouper WS which implements the Voot spec

Note: only the operations are implemented, not the OAuth 2.0.  Authentication can be anything implemented for Grouper WS and is pluggable in the same way that Grouper WS is.  You can easily implement servlet container or web server basic auth without any effort.  If someone has an oauth 2.0 voot consumer and wants to work with the Grouper team to make oauth 2.0 work with this plugin, let the Grouper team know.

This is currently running on the Grouper Demo Server.

The code is in SVN in the Grouper 2.0 branch (checkout, browse). The connector works with Grouper v2.0.0+. You can download the jar here.

Mappings

  • The voot Group ID is the grouper group system name
  • The voot Group Name is the grouper group display name
  • The voot Group description is the grouper group description
  • The voot person email maps to the subject attribute name in the sources.xml file identified by emailAttributeName
  • The voot person id is the subject id
  • The voot person displayName is the subject name
  • The voot member admin role maps to the group admin privilege (note, if they are a grouper admin, they are also a member of the group)
  • The voot member manager role maps to the group update privilege (note, if they are a grouper update, they are also a member of the group)
  • The voot member member role maps to the group members list

Grouper extensions

  • If you pass in the request parameter indentResponse=true, then the resulting json will be indented

Examples

Ask the grouper team for a user/pass to the grouper demo WS (currently basic auth via apache)

https://grouperdemo.internet2.edu/grouper-ws_v2_0_0/voot/groups/@me?indentResponse=true

{

  "entry":[

    {

      "description":"",

      "id":"aStem:aGroup",

      "name":"aStem:A Group",

      "voot_membership_role":"member"

    },

    {

      "description":"",

      "id":"aStem:aGroup2",

      "name":"aStem:A Group 2",

      "voot_membership_role":"manager"

    },

    {

      "description":"",

      "id":"aStem:aGroup3",

      "name":"aStem:A Group 3",

      "voot_membership_role":"admin"

    },

    {

      "description":"",

      "id":"qsuob:all",

      "name":"QS University of Bristol:All Students and Staff",

      "voot_membership_role":"member"

    },

    {

      "description":"",

      "id":"qsuob:all_students",

      "name":"QS University of Bristol:All students",

      "voot_membership_role":"member"

    },

    {

      "description":"",

      "id":"qsuob:faculties:scif:students",

      "name":"QS University of Bristol:Academic faculties:Science:Students",

      "voot_membership_role":"member"

    }

  ]

  ,

  "itemsPerPage":6,

  "startIndex":0,

  "totalResults":6

}

https://grouperdemo.internet2.edu/grouper-ws_v2_0_0/voot/groups?indentResponse=true

{

  "entry":[

    {

      "description":"Internal utility group for group mvmTestGroup which facilitates the group math for the include and exclude lists",

      "id":"users:penn2:mvm:mvmTestGroup_systemOfRecordAndIncludes",

      "name":"users:penn2:mvm:mvmTestGroup system of record and includes"

    },

    {

      "description":"",

      "id":"users:utah:earl.lewis:earlTestGroup",

      "name":"users:utah:earl.lewis:earlTestGroup"

    },

    {

      "description":"Group containing list of test2 after adding the includes and subtracting the excludes",

      "id":"users:penn:mchyzer:test2",

      "name":"users:penn:mchyzer:test2"

    },

    {

      "description":"Group containing list of addincludethingbwh after adding the includes and subtracting the excludes",

      "id":"users:penn:bwh:manilla:addincludethingbwh",

      "name":"users:penn:bwh:manilla:addincludethingbwh"

    },

    {

      "description":"Administrator",

      "id":"users:penn:teresh:admin",

      "name":"users:penn:teresh:Admin1"

    }

    #################ETC################

 ]

  ,

  "itemsPerPage":291,

  "startIndex":0,

  "totalResults":291

}

https://grouperdemo.internet2.edu/grouper-ws_v2_0_0/voot/people/@me?indentResponse=true

{

  "entry":[

    {

      "displayName":"Barry Blair",

      "emails":[

        {

          "type":"email",

          "value":""

        }

      ]

      ,

      "id":"babl"

    }

  ]

  ,

  "itemsPerPage":1,

  "startIndex":0,

  "totalResults":1

}

https://grouperdemo.internet2.edu/grouper-ws_v2_0_0/voot/people/@me/aStem:aGroup2?indentResponse=true

{

  "entry":[

    {

      "displayName":"Barry Masterson",

      "id":"bama",

      "voot_membership_role":"admin"

    },

    {

      "displayName":"Barry Blair",

      "emails":[

        {

          "type":"email",

          "value":""

        }

      ]

      ,

      "id":"babl",

      "voot_membership_role":"admin"

    },

    {

      "displayName":"Barry Windsor",

      "id":"bawi",

      "voot_membership_role":"admin"

    }

  ]

  ,

  "itemsPerPage":3,

  "startIndex":0,

  "totalResults":3

}

Installation

Here is the README.txt

To build the grouperVoot.jar

- Have grouper and grouper-ws project checked out and built

- Copy the build.example.properties to build.properties

- Configure the build.properties to point to grouper and grouper-ws

- Run the ant target build or distBinary

 

To run Grouper Voot

- Setup and run the grouper WS

- Copy the grouperVoot.jar to the WEB-INF/lib of grouper WS

- Make sure your sources.xml has an email attribute name in applicable subject sources:

 

     <!-- If using emails and need email addresses in sources, set which attribute has the email address in this source -->

     <init-param>

       <param-name>emailAttributeName</param-name>

       <param-value>email</param-value>

     </init-param>

 

- Setup the web.xml

 

  <filter-mapping>

    <filter-name>Grouper service filter</filter-name>

    <url-pattern>/voot/*</url-pattern>

  </filter-mapping>

 

  <servlet>

    <servlet-name>VootServlet</servlet-name>

    <display-name>Voot Servlet</display-name>

    <servlet-class>edu.internet2.middleware.grouperVoot.VootServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

  </servlet>

 

  <servlet-mapping>

    <servlet-name>VootServlet</servlet-name>

    <url-pattern>/voot/*</url-pattern>

  </servlet-mapping>

 

- If you are using basic auth in the web.xml, make sure the voot servlet is protected:

 

  <security-constraint>

    <web-resource-collection>

      <web-resource-name>Voot services</web-resource-name>

      <url-pattern>/voot/*</url-pattern>

    </web-resource-collection>

    <auth-constraint>

      <role-name>grouper_user</role-name>

    </auth-constraint>

  </security-constraint>

 

- Voot documentation:

 

https://github.com/andreassolberg/voot/wiki/Protocol

 

- Turn on the grouper web services, and try the following URL's:

 

https://grouper.whatever.com/grouperWs/voot/groups/@me

https://grouper.whatever.com/grouperWs/voot/groups

https://grouper.whatever.com/grouperWs/voot/people/@me

https://grouper.whatever.com/grouperWs/voot/people/@me/aStem:aGroup2  [note: put in valid group name]

 

You can pass in a param to indent the response:

 

https://grouper.whatever.com/grouperWs/voot/groups/@me?indentResponse=true

https://grouper.whatever.com/grouperWs/voot/groups?indentResponse=true

https://grouper.whatever.com/grouperWs/voot/people/@me?indentResponse=true

https://grouper.whatever.com/grouperWs/voot/people/@me/aStem:aGroup2?indentResponse=true

 

This is running on the Grouper demo server e.g. here:

 

https://grouperdemo.internet2.edu/grouper-ws_v2_0_0/voot/groups/@me?indentResponse=true

https://grouperdemo.internet2.edu/grouper-ws_v2_0_0/voot/groups?indentResponse=true

https://grouperdemo.internet2.edu/grouper-ws_v2_0_0/voot/people/@me?indentResponse=true

https://grouperdemo.internet2.edu/grouper-ws_v2_0_0/voot/people/@me/aStem:aGroup2?indentResponse=true

 

 



  • [grouper-users] Grouper Voot Connector, Chris Hyzer, 10/04/2012

Archive powered by MHonArc 2.6.16.

Top of Page