Bug 5855 - TeraGrid Science Gateway Use Case
: TeraGrid Science Gateway Use Case
Status: RESOLVED FIXED
: GridShib
SAML/Binding Tools
: 0.3
: All All
: P3 enhancement
: beta
Assigned To:
:
:
: 5877
: 5748
  Show dependency treegraph
 
Reported: 2008-02-06 17:23 by
Modified: 2008-04-25 21:12 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-02-06 17:23:16
This bug will track the design, development, and distribution of code and
documentation resources supporting the TeraGrid Science Gateway Use Case.

Deliverables:  

- Design and develop code resources on top of GridShib SAML Tools that
facilitate the "TeraGrid Science Gateway Use Case," that is, the ability of
gateways to create SAML tokens and bind these tokens to X.509 proxy
certificates.

- Provide documentation that motivates the Use Case and supports the deployment
and integration of the code resources.

Timeframe:

- The code and documentation will be released concurrently with GridShib SAML
Tools v0.3.0 Release Candidate, that is, Feb 2008.
------- Comment #1 From 2008-02-07 13:41:08 -------
The goal is to bind a SAML token to a proxy certificate signed by the gateway's
community credential.  As I understand the requirements, the X.509-bound SAML
token should contain the following information:

* entityID: a globally unique identifier for the SAML issuer (i.e., the
gateway)
* name identifier: a globally unique identifier for the authenticated user
* authentication statement: a description of the act of authentication at the
gateway
** authentication method: an identifier specifying the method of authentication
(e.g., password)
** authentication instant: a dateTime stamp indicating the exact time the
authentication took place
** IP address: the IP address of the user agent involved in the authentication
event
* attribute statement: a collection of user attributes
** isMemberOf attribute: an attribute declaring the user's membership in a
virtual organization (VO)
** mail attribute: the user's e-mail address

Notes:

- All of the above information is required except as noted below.
- An authentication statement is required if and only if the gateway is NOT
shib-enabled.  If the gateway is shib-enabled, the IdP will provide the
authentication context.
- The authentication instant is optional.  If it is omitted, the software will
default to NOW.
- The IP address is optional, if only because it is difficult to obtain the
authenticated user's IP address in some gateway environments (e.g., in a
portlet environment).
------- Comment #2 From 2008-02-07 13:43:12 -------
A gateway configuration file ($GRIDSHIB_HOME/etc/tg-gateway-config.properties)
has been written and will be distributed with GS-ST v0.3.0 RC.
------- Comment #3 From 2008-02-07 19:41:30 -------
(In reply to comment #1)
> 
> - The authentication instant is optional.  If it is omitted, the software will
> default to NOW.

So there's an interesting trade-off here.  Technically, setting AuthnInstant to
NOW is incorrect.  If the RP had policy with respect to AuthnInstant, it is
likely a value of NOW would lead to a false positive.

On the other hand, a correct value of AuthnInstant is difficult to compute.  It
requires that state be maintained from the time the user authenticates to the
time the user makes the request.  This could be done (using cookies and
sessions) but this raises the bar considerably, I think.

So which approach do we take?
------- Comment #4 From 2008-02-07 22:55:16 -------
(In reply to comment #2)
> A gateway configuration file ($GRIDSHIB_HOME/etc/tg-gateway-config.properties)
> has been written and will be distributed with GS-ST v0.3.0 RC.

Committed to CVS HEAD.
------- Comment #5 From 2008-02-07 23:01:03 -------
(In reply to comment #1)
> 
> - The IP address is optional, if only because it is difficult to obtain the
> authenticated user's IP address in some gateway environments (e.g., in a
> portlet environment).

I'm not sure what to do about this.  The RP could definitely make use of the IP
address of the authenticated user, but there is no known workaround in the case
of a portlet environment.  I want to require the gateway to provide an IP
address but you know that old saying "you can't squeeze blood from a turnip."
------- Comment #6 From 2008-02-08 05:28:56 -------
Using code that Terry Fleury and Jim Basney had written, implemented
toGSSCredential and toGlobusCredential methods in GSIUtil.  Committed the
latter to CVS HEAD.
------- Comment #7 From 2008-02-08 06:32:30 -------
Write a class called GatewayCredential such that the following is possible:

GatewayCredential cred = new GatewayCredential("trscavo");
cred.addEmailAddress("trscavo@gmail.com");
String authnMethod = 
  SAMLAuthenticationStatement.AuthenticationMethod_Password;
// wholly contrived authnInstant, 5 mins in the past:
Date authnInstant = new Date(new Date().getTime() - 1000*60*5);
String ipAddress = "255.255.255.255";
cred.addAuthnStatement(authnMethod, authnInstant, ipAddress);
GSIUtil.printCredential(cred.issue());
------- Comment #8 From 2008-02-09 18:42:40 -------
The untested code in Comment #7 turned out to be fairly close...see the
GatewayCredential and GatewayCredentialTest classes.  GatewayCredential is a
subclass of GlobusSAMLCredential where most of the heavy lifting is done.  All
code has been committed to CVS HEAD. 
------- Comment #9 From 2008-02-09 18:47:34 -------
Committed the SAMLCredential class to CVS HEAD.  SAMLCredential is the
precursor (i.e., proof of concept) to GatewayCredential.  Since the latter has
now been committed to CVS, SAMLCredential has been moved to the attic:

http://viewcvs.globus.org/viewcvs.cgi/gridshib/saml/teragrid/java/tests/org/teragrid/ncsa/gridshib/security/SAMLCredential.java?hideattic=0&view=log
------- Comment #10 From 2008-02-09 19:03:51 -------
(In reply to comment #3)
> (In reply to comment #1)
> > 
> > - The authentication instant is optional.  If it is omitted, the software will
> > default to NOW.
> 
> So there's an interesting trade-off here.  Technically, setting AuthnInstant to
> NOW is incorrect.  If the RP had policy with respect to AuthnInstant, it is
> likely a value of NOW would lead to a false positive.
> 
> On the other hand, a correct value of AuthnInstant is difficult to compute.  

The code implements the following compromise solution.  In
GlobusSAMLCredential, there's the following method:

public void setAuthnContext(
        String authnMethod, Date authnInstant, String ipAddress);

An exception is thrown if either authnMethod or authnInstant is null.  Thus it
is up the gateway developer to 1) call the method, and 2) provide correct
values for authnMethod and authnInstant.  Either the RP trusts the gateway to
do this or not.

The software does NOT default authnInstant to NOW.  In fact, the software
includes an AuthenticationStatement in the SAML token if and only if the
developer calls the setAuthnContext method.  In the end, it is up to the RP to
implement policy with respect to AuthnContext.
------- Comment #11 From 2008-02-09 19:07:56 -------
(In reply to comment #5)
> (In reply to comment #1)
> > 
> > - The IP address is optional, if only because it is difficult to obtain the
> > authenticated user's IP address in some gateway environments (e.g., in a
> > portlet environment).
> 
> I'm not sure what to do about this.

SAML does not require every AuthenticationStatement to have an IP address,
therefore the software does not either.  The developer may call the method in
Comment #10 with a null value for argument ipAddress.  In that case, the
software will simply not include an IP address in the AuthenticationStatement. 
In the end, it is up to the RP to implement policy with respect to IP address.
------- Comment #13 From 2008-02-09 19:13:31 -------
Except for code cleanups and bug fixes, all code has been committed to CVS. 
This bug will remain open until the documentation has been written.
------- Comment #14 From 2008-02-24 14:34:27 -------
The primary document resides in the TeraGrid wiki:

http://www.teragridforum.org/mediawiki/index.php?title=Science_Gateway_Credential_with_Attributes

There is also a readme file that is mostly a link to the above wiki document:

http://gridshib.globus.org/docs/gridshib-saml-tools-0.3.0-rc/teragrid/readme.html

There is a separate CHANGES document as well:

http://gridshib.globus.org/docs/gridshib-saml-tools-0.3.0-rc/teragrid/CHANGES.txt

This issue is fully resolved.