1 / 23

Grouper Training – Admin – Subject API – Part 1

Grouper Training – Admin – Subject API – Part 1. Shilen Patel Duke University. This work licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License. Contents. Introduction Source adapters Group Source Adapter Entity Source Adapter JDBC Source Adapter

babu
Download Presentation

Grouper Training – Admin – Subject API – Part 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Grouper Training – Admin – Subject API – Part 1 Shilen Patel Duke University This work licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

  2. Contents • Introduction • Source adapters • Group Source Adapter • Entity Source Adapter • JDBC Source Adapter • Alternate JDBC Source Adapter • JNDI Source Adapter

  3. Introduction Used by Grouper to integrate with source systems. Avoids replicating all of your subject data into Grouper.

  4. Introduction (continued) • Subjects have the following properties: • id • type (person, group, application) • sourceId • name • description • Other attributes including other identifiers.

  5. Introduction (continued)

  6. Source Adapters: Group Source Adapter Source adapter to resolve Grouper groups as subjects. Configured by default in the sources.xml file and usually does not require changes.

  7. Source Adapters: Entity Source Adapter Source adapter to resolve Grouper entities as subjects. Configured by default in the sources.xml file and usually does not require changes.

  8. Source Adapters: JDBC Source Adapter Adapter class: edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter Source adapter to resolve subjects (usually people) in relational databases.

  9. Source Adapters: JDBC Source Adapter (continued) • Database connection settings • Two connection providers: • edu.internet2.middleware.subject.provider.C3p0JdbcConnectionProvider • edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider • Example configuration <init-param> <param-name>jdbcConnectionProvider</param-name> <param-value>edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider </param-value> </init-param>

  10. Source Adapters: JDBC Source Adapter (continued) • Specify queries based on SQL statements: • searchSubject • searchSubjectByIdentifier • search

  11. Source Adapters: JDBC Source Adapter (continued) • Specify subject id, name, and description <init-param> <param-name>SubjectID_AttributeType</param-name> <param-value>id</param-value> </init-param> <init-param> <param-name>Name_AttributeType</param-name> <param-value>name</param-value> </init-param> <init-param> <param-name>Description_AttributeType</param-name> <param-value>description</param-value> </init-param>

  12. Source Adapters: JDBC Source Adapter (continued) • Additional identifiers (comma separated) <init-param> <param-name>identifierAttributes</param-name> <param-value>LOGINID</param-value> </init-param>

  13. Source Adapters: Alternate JDBC Source Adapter • Adapter class: edu.internet2.middleware.grouper.subj.GrouperJdbcSourceAdapter2 • Assumes that one table or view contains all the subject data. • Performs more intelligent searching. • Database connection settings • Same as previous JDBC source adapter.

  14. Source Adapters: Alternate JDBC Source Adapter (continued) • Specify table/view, subject id, name, and description <init-param> <param-name>dbTableOrView</param-name> <param-value>person_source_v</param-value> </init-param> <init-param> <param-name>subjectIdCol</param-name> <param-value>some_id</param-value> </init-param> <init-param> <param-name>nameCol</param-name> <param-value>name</param-value> </init-param> <init-param> <param-name>descriptionCol</param-name> <param-value>description</param-value> </init-param>

  15. Source Adapters: Alternate JDBC Source Adapter (continued) • Searches (not by id or identifier) <init-param> <param-name>lowerSearchCol</param-name> <param-value>description_lower</param-value> </init-param> • Sorting (optional) <init-param> <param-name>defaultSortCol</param-name> <param-value>description</param-value> </init-param>

  16. Source Adapters: Alternate JDBC Source Adapter (continued) • Additional identifiers <init-param> <!-- col which identifies the row, perhaps not subjectId, add multiple by incrementing the 0 index -- > <param-name>subjectIdentifierCol0</param-name> <param-value>pennname</param-value> </init-param> • Additional attributes <!-- now you can count up from 0 to N of attributes for various cols. The name is how to reference in subject.getAttribute() -- > <init-param> <param-name>subjectAttributeCol0</param-name> <param-value>pennname</param-value> </init-param> <init-param> <param-name>subjectAttributeName0</param-name> <param-value>PENNNAME</param-value> </init-param>

  17. Source Adapters: JNDI Source Adapter Adapter class: edu.internet2.middleware.grouper.subj.GrouperJndiSourceAdapter Source adapter to resolve subjects (usually people) in an LDAP or AD.

  18. Source Adapters: JNDI Source Adapter (continued) • LDAP connection settings • Specify within sources.xml file. • Use an external file <init-param> <param-name>ldapProperties_file</param-name> <param-value>ldap.properties</param-value> </init-param>

  19. Source Adapters: JNDI Source Adapter (continued) • Specify queries based on filters with a search base and scope: • searchSubject • searchSubjectByIdentifier • search

  20. Source Adapters: JNDI Source Adapter (continued) • Specify subject id, name, and description <init-param> <param-name>SubjectID_AttributeType</param-name> <param-value>exampleEduRegID</param-value> </init-param> <init-param> <param-name>Name_AttributeType</param-name> <param-value>cn</param-value> </init-param> <init-param> <param-name>Description_AttributeType</param-name> <param-value>description</param-value> </init-param>

  21. Source Adapters: JNDI Source Adapter (continued) • Additional attributes <attribute>cn</attribute> <attribute>sn</attribute> <attribute>uid</attribute> <attribute>department</attribute> <attribute>exampleEduRegId</attribute>

  22. Quiz Click on the quiz link in the video description to reinforce your knowledge of this topic.

  23. Thanks! • Further information: • Infosheets, mailing lists, wiki, downloads, etc.:www.internet2.edu/grouper • Grouper demo server:grouperdemo.internet2.edu/ • Grouper Online Training Home:spaces.internet2.edu/x/IIGfAQ This work licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

More Related