<?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>5965</bug_id>
          
          <creation_ts>2008-03-30 19:48</creation_ts>
          <short_desc>implement SAMLPrincipal class in GS-ST</short_desc>
          <delta_ts>2008-06-23 07:52:09</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.4.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>beta</target_milestone>
          <dependson>5960</dependson>
    
    <dependson>6176</dependson>
          <blocked>5791</blocked>
    
    <blocked>6179</blocked>
    
    <blocked>6332</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tom Scavo">trscavo@gmail.com</reporter>
          <assigned_to name="Tom Scavo">trscavo@gmail.com</assigned_to>
          <cc>gridshib-dev@globus.org</cc>
    
    <cc>tfreeman@mcs.anl.gov</cc>
    
    <cc>vwelch@uiuc.edu</cc>

      

      
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2008-03-30 19:48:27</bug_when>
            <thetext>Implement a new SAMLPrincipal class and incorporate it into GridShib Common.  See Bug 5960 for a precise list of requirements.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2008-06-20 09:38:57</bug_when>
            <thetext>The following tasks have been completed:

- implement class SAMLPrincipal and its unit test:
org.globus.gridshib.security.saml.SAMLPrincipal
org.globus.gridshib.security.saml.SAMLPrincipalTest

- implement method getSAMLPrincipals in SAMLSecurityContext:
public Principal[] getSAMLPrincipals();

- rewrite toString(boolean) method in SAMLSecurityContext; in particular, add SAML principals to string representation of SAMLSecurityContext

- log SAML principals in SecurityContextLogger

- expose method quote(String) in SecurityContextLogger:
public static String quote(String value);
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2008-06-20 10:05:23</bug_when>
            <thetext>The security context must maintain the following invariant:

For every *trusted* SAMLIdentity (whose NameQualifier is null), there is a corresponding SAMLPrincipal (and vice versa).  That is, there is a one-to-one correspondence between SAML principals and trusted, unqualified SAML identities.

I haven&apos;t figured out how to maintain this invariant in GS-ST.  In GS4GT, there is a hack in AttributeAcceptancePIPImpl that instantiates a SAMLPrincipal for every SAMLIdentity that meets the requirements.  Of course that won&apos;t work in GS-ST (which has no notion of &quot;interceptor&quot;), and besides, it&apos;s error prone to have to maintain the invariant manually.

I&apos;m considering my options.  Comments welcome.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2008-06-20 15:07:11</bug_when>
            <thetext>(In reply to comment #2)
&gt; The security context must maintain the following invariant:
&gt; 
&gt; For every *trusted* SAMLIdentity (whose NameQualifier is null), there is a
&gt; corresponding SAMLPrincipal (and vice versa).  That is, there is a one-to-one
&gt; correspondence between SAML principals and trusted, unqualified SAML
&gt; identities.

To maintain this invariant automatically (i.e., without developer intervention), the trick is to nest a SAMLPrincipal object inside each SAMLIdentity instance.  Initially, the nested SAMLPrincipal object is null, but when the setTrusted(boolean) method on the SAMLIdentity instance is called, a SAMLPrincipal object is created if the conditions are met.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2008-06-20 15:16:42</bug_when>
            <thetext>Committed the following source files to CVS HEAD:

org.globus.gridshib.security.saml.SAMLPrincipal
org.globus.gridshib.security.saml.SAMLPrincipalTest
org.globus.gridshib.security.SAMLIdentity
org.globus.gridshib.security.SAMLIdentityTest</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2008-06-20 15:48:41</bug_when>
            <thetext>Added getSAMLPrincipals() method to SAMLSecurityContext.  Modified the toString(boolean) so that it includes SAML principals.  If verbose, the toString method also returns string representations of other principals and the X.509 certificate chain.  (It already returns the raw SAML assertion if verbose.)

Log SAML principals in SecurityContextLogger.  Made the quote(String) method public (so I can use it in the GS4GT security context).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2008-06-20 15:58:43</bug_when>
            <thetext>I&apos;ll note for the record that the current implementation of SAMLSecurityContext prevents duplicate security items from being added to the security context.  This is a natural consequence of the Java Collections API and the equals methods of the SAMLIdentity, SAMLAuthnContext, and BasicAttribute classes.

This will be important in the next iteration of GS4GT.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Tom Scavo">trscavo@gmail.com</who>
            <bug_when>2008-06-20 16:03:02</bug_when>
            <thetext>In addition to the files in Comment #4, the following source files have been committed to CVS HEAD:

org.globus.gridshib.security.SAMLSecurityContext
org.globus.gridshib.security.SecurityContextLogger

This completes the integration of SAMLPrincipal into the GridShib Security Framework.  This new feature will be available in GS-ST v0.4.3.</thetext>
          </long_desc>
      
      

    </bug>

</bugzilla>