You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This Grouper enhancement facilitates secure subject attribute release.  This could be used to protect FERPA information, create private subdomains of Grouper where users from one might not be able to see subjects in another, or attributes which can only be seen by certain subjects.

In Grouper v2.0- there is no subject attribute security (unless it is baked into the custom subject source).

This is an interface point which can be implemented in Java to retrieve more attributes about a subject (i.e. attributes which may require another query, or security, or attributes not always needed when subjects are resolved)

Implement the interface SubjectCustomizer by extending the class: edu.internet2.middleware.grouper.subj.SubjectCustomizerBase

public interface SubjectCustomizer {

  /**
   * decorate subjects based on attributes requested
   * @param grouperSession
   * @param subjects
   * @param attributeNamesRequested
   */
  public void decorateSubjects(GrouperSession grouperSession, Collection<Subject> subjects, Collection<String> attributeNamesRequested);
  
  /**
   * you can edit the subjects (or replace), but you shouldnt remove them
   * @param grouperSession
   * @param subjects
   */
  public void filterSubjects(GrouperSession grouperSession, Collection<Subject> subjects);
  
}

Configure this in the grouper.properties:

# customize subjects by implementing this interface: edu.internet2.middleware.grouper.subj.SubjectCustomizer
# or extending this class: edu.internet2.middleware.grouper.subj.SubjectCustomizerBase (recommended)
# note the instance will be reused to make sure it is threadsafe
subjects.customizer.className = 

Note that the filter and decorator are batched for performance reasons, which is also why this is not configured in the subject source

The filterSubjects() method is called on each SubjectFinder call.  The decorateSubjects() is called when web services resolve subjects

There are two ways to protect data.  

1. You can change the data to protect it, the user will see the subject, but might only see the netId instead of the name.  Or it could just say (protected-data)

2. You could remove the subject from the results and the user will not know the subject exists

sdf

  • No labels