dCache/dcache — pull request #80 by gbehrmann (2013-05-31 12:57:59+00:00)
Title: gplazma: Simplify mapping plugin interface

Addresses an issue with the interface of gPlazma mapping plugins.
Third party mapping plugins will have to be updated.

The old interface distinguished between identified principals and
authorized principals. The idea was that only principals that had
somehow been recognized by a mapping plugin would be considered
authorized and returned to dCache. This approach howeve has several
problems:

- Complexity

- Redundancy; a principal by definition is an assertion that the
principal belongs to the user (although the level of trust can
be given a principal strongly depends on its type, eg a DN is
stronger that a user name, and a user name is stronger than an
unchecked login name). More over, a principal in it self doesn't
give access to any additional resources: A second authorization
step is always done by dCache, authorizing a particular principal
to do something.

- Limiting, as it was impossible to just "pass through" a principal
already generated and confirmed by the door. Some doors can do
their own authentication and there is no reason why one should
absolutely have to configure a mapping plugin just for the i
principal to be passed through.

- Inability of authentication plugins to generate principals that
are passed through to dCache without further mapping. For instance,
the XACML plugin takes DN and FQAN extracted from the cert chain
and does a lookup through XACML to generate a user name. A
subsequent mapping plugin maps the user name to UID/GID, but the
DN and FQAN is lost as it is not mapped. Yet both DN and FQAN are
used by other components in dCache for authorization steps.

This patch addresses the problem by changing the mapping plugin
interface. It now takes a single set of principals which it can
add principals to (and possible remove from). Tests are updated
to reflect the changed semantics.

Merge for 2.6 is requested because the patch is a prerequisite to
resolve the XACML problem mentioned above.

Target: master
Request: 2.6
Require-notes: yes
Require-book: yes
Acked-by: Tigran Mkrtchyan
Acked-by: Paul Millar
Patch: http://rb.dcache.org/r/5545/
(cherry picked from commit b5a977e0463a6084401eaa0aeca1a8b6ba938bdf)