<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugzilla.globus.org/bugzilla/bugzilla.dtd">

<bugzilla version="3.2.3"
          urlbase="http://bugzilla.globus.org/bugzilla/"
          maintainer="bacon@mcs.anl.gov"
>

    <bug>
          <bug_id>6689</bug_id>
          
          <creation_ts>2009-03-14 10:23</creation_ts>
          <short_desc>Define new SecurityAttributes interface</short_desc>
          <delta_ts>2009-03-15 10:16:49</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>GridShib</product>
          <component>SAML/Binding Tools</component>
          <version>0.5.3</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <bug_file_loc>http://dev.globus.org/wiki/GridShib_Security_Table</bug_file_loc>
          
          
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>0.5.4</target_milestone>
          <dependson>6691</dependson>
          <blocked>6690</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tom Scavo">trscavo@gmail.com</reporter>
          <assigned_to name="Tom Scavo">trscavo@gmail.com</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2009-03-14 10:23:48</bug_when>
            <thetext>Define a new SecurityAttributes interface that lets you decorate a security item (or even a security context implementation) with attributes.  Here the term &quot;attribute&quot; refers to the most general notion of attribute, as discussed in the wiki article entitled &quot;GridShib Security Table&quot; (see link above).  This new interface will in fact support the Security Table implementation.

The SecurityAttributes interface implicitly defines a &quot;security attribute&quot; as a name-value pair whose name is a simple string and whose value is a set of strings.  One string in the set of value strings is distinguished in some manner, to be determined by the implementation.

public interface SecurityAttributes {
    public boolean addAttributeValue(String name, String value);
    public boolean removeAttribute(String name);
    public String getAttributeValue(String name);
    public Set getAttributeValues(String name);
    public Set getAttributeNames();
}

Not all of the current security items will implement this interface.  SAMLIdentity and BasicAttribute will implement this interface.  SAMLPrincipal and TeraGridPrincipal will also implement this interface.  The rest of the security items will probably not implement this interface.  SAMLAuthnContext, for example, doesn&apos;t seem to have anything to add to the set of SecurityAttributes.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2009-03-14 17:13:37</bug_when>
            <thetext>New implementation of SecurityAttributes interface:

public abstract class DecoratedSecurityItem extends BaseSecurityItem
                                         implements SecurityAttributes;

Concrete classes SAMLIdentity, BasicAttribute, and SAMLPrincipal now extend the above class.  Each of these classes adds a security attribute when the security item becomes trusted.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2009-03-14 17:36:10</bug_when>
            <thetext>The SAMLPrincipal class has a new type member and a corresponding getType method.  Constructor SAMLPrincipal(String, String, String) was deprecated in favor of the SAMLPrincipal(String, String, String, String) constructor.  The latter takes a new type parameter.

In the constructor, a security attribute is added:

this.addAttributeValue(this.type, this.name);

The type and name of this SAMLPrincipal instance are the name and value of the security attribute, respectively.  Presumably the type is a URI that uniquely identifies the attribute.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2009-03-14 17:39:21</bug_when>
            <thetext>Committed all resources to CVS HEAD.  This new feature will be distributed with GS-ST v0.5.4 (which will not be publicly release).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2009-03-14 17:54:30</bug_when>
            <thetext>(In reply to comment #2)
&gt; Constructor SAMLPrincipal(String, String, String) was deprecated in
&gt; favor of the SAMLPrincipal(String, String, String, String) constructor.

The SAMLSecurityContext class invokes the new constructor instead of the deprecated constructor.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2009-03-14 18:09:50</bug_when>
            <thetext>(In reply to comment #4)
&gt; (In reply to comment #2)
&gt; &gt; Constructor SAMLPrincipal(String, String, String) was deprecated in
&gt; &gt; favor of the SAMLPrincipal(String, String, String, String) constructor.
&gt; 
&gt; The SAMLSecurityContext class invokes the new constructor instead of the
&gt; deprecated constructor.

Same goes for the unit tests BasicAttributeTest and SAMLPrincipalTest.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2009-03-14 18:15:37</bug_when>
            <thetext>(In reply to comment #2)
&gt; Constructor SAMLPrincipal(String, String, String) was deprecated in
&gt; favor of the SAMLPrincipal(String, String, String, String) constructor.

Since the TeraGridPrincipal class is a subclass of the SAMLPrincipal class, the former now invokes the new constructor, not the deprecated constructor.  The TeraGridPrincipal class passes the following type value to the constructor:

http://teragrid.org/names/nameid-format/principalname

Other instances of SAMLPrincipal will behave similarly.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2009-03-15 09:40:40</bug_when>
            <thetext>Added unit tests to each of SAMLIdentityTest, SAMLPrincipalTest, and BasicAttributeTest.</thetext>
          </long_desc>
      
      

    </bug>

</bugzilla>