Bug 5882

Summary: Expressing TeraGrid policy requirements
Product: GridShib Reporter: Tom Scavo <trscavo@gmail.com>
Component: GT pluginAssignee: Tom Scavo <trscavo@gmail.com>
Status: NEW    
Severity: normal CC: gridshib-dev@globus.org, smartin@mcs.anl.gov, trscavo@gmail.com, vwelch@uiuc.edu
Priority: P3    
Version: 0.6   
Target Milestone: beta   
Hardware: All   
OS: All   
Bug Depends on: 6668    
Bug Blocks:    

Description From 2008-02-23 07:13:24
On the TeraGrid Science Gateway call (Feb 22, 2008), the following policy
requirements were discussed (either directly or indirectly):

* A SAML identity is required
** A name identifier with format F1, F2, or F3 is required
* An authentication statement (sometimes called an "authentication context") is
required
** The age of the authn context (as given by the authnInstant) is limited to N
seconds
** An IP address is required
* An attribute statement is required
** An isMemberOf attribute is required and its value is restricted to VO1, VO2,
or VO3
** A mail attribute is required

Except for the last sub-bullet, GS4GT can't express any of the above policy, so
I'm recording it here for future reference.
------- Comment #1 From 2008-02-23 07:43:03 -------
The value of the isMemberOf attribute is something like the following:

group://gisolve.org/gisolve

The above attribute value tells the RP that the end user is a member of the
virtual organization (VO) whose name is "gisolve".  The string "gisolve.org" is
a scope and so the value is a scoped attribute value.

In general, the isMemberOf attribute value takes on the following form:

group://scope/vo_name/group_name/subgroup_name#role

There is an intentionally strong resemblance between such attribute values and
VOMS fully qualified attribute values (FQANs).
------- Comment #2 From 2008-06-16 13:16:27 -------
Raising the discussion to the next level, given today's policy, a request from
a science gateway is treated like any other request, that is, the request is
accepted if the DN is in the gridmap.  This is incorrect.  A gateway request
should be accepted if the proxy is accompanied by SAML attributes *and* the
required attributes (whatever those turn out to be) are present.  Only a
non-gateway request should be subject to ordinary gridmap short-circuiting.

I don't see how to fix this easily.  It leads to a dual policy scenario keyed
off the identity of the requester.  We don't support anything like that at the
moment, not even close.
------- Comment #3 From 2008-07-09 09:48:57 -------
(In reply to comment #2)
> 
> I don't see how to fix this easily.

Actually, it is relatively low-hanging fruit to refactor the GridShibPDP so
that it handles both cases (i.e., gateways and non-gateways):

http://www.globus.org/mail_archive/gridshib-dev/2008/06/msg00131.html
------- Comment #4 From 2008-07-21 11:09:06 -------
(In reply to comment #0)
> 
> * A SAML identity is required

Add an element such as the following to the policy schema:

<saml:NameIdentifier Format="urn:oid:1.3.6.1.4.1.5923.1.1.1.6"/>

I believe an empty NameIdentifier element is schema-valid but this needs to be
tested.
------- Comment #5 From 2008-07-23 10:03:43 -------
The following tasks have been identified:

- implement GridmapPDPImpl
- implement GridmapPDP (GT4.0)
- implement GridmapPDP (GT4.2)
- modify GS4GT.java for entity map short circuiting
------- Comment #6 From 2008-07-23 10:08:28 -------
(In reply to comment #5)
> 
> - implement GridmapPDP (GT4.0)

Return true iff GridmapPDPImpl returns PERMIT or NOT_APPLICABLE.  Compare with
the GT4.0 version of GridmapPDP:

http://viewcvs.globus.org/viewcvs.cgi/wsrf/java/core/source/src/org/globus/wsrf/impl/security/authorization/GridMapAuthorization.java?view=log&pathrev=globus_4_0_7
------- Comment #7 From 2008-10-22 11:35:42 -------
The issue described in Comment #2, Comment #3, Comment #5, and Comment #6 has
been siphoned off into a new bug (Bug 6497) since the issue is a general
problem not restricted to TeraGrid.
------- Comment #8 From 2009-03-05 18:20:41 -------
Bug 6497 is separate from this bug since TeraGrid now has its own PDP (Bug
6668).
------- Comment #9 From 2009-03-05 18:31:49 -------
(In reply to comment #4)
> (In reply to comment #0)
> > 
> > * A SAML identity is required
> 
> Add an element such as the following to the policy schema:
> 
> <saml:NameIdentifier Format="urn:oid:1.3.6.1.4.1.5923.1.1.1.6"/>

In terms of TeraGrid policy requirements, this is the most significant omission
from the GridShib policy language.  If we could add this single capability to
the policy language, it would go a long way.

In fact the requirements are slightly different than the above.  We need to be
able to specify the following in the policy file:

<saml:NameIdentifier 
  Format="http://teragrid.org/names/nameid-format/principalname">
  ^.+\.teragrid\.org$
</saml:NameIdentifier>

In other words, a gateway user identifier must end with ".teragrid.org". 
(Low-level formatting requirements are enforced by the TGPN format handler
referenced in Bug 6679.)