On Dec 3, 2007, at 2:23 PM, Johnny Bufu wrote:
> OpenID-enabling Shibboleth sounds really interesting, and it would be
> nice to have this feature in openid4java, especially after we've done
> a similar thing with OpenID Infocards (using OpenID instead of SAML
> tokens).
This might not mean what you think. This would be a plugin for
Shibboleth that would use openid4java to handle all of the OpenID
specific stuff. It would use the library just like any other web
application. It wouldn't directly add any functionality to the
library, but would simply require that it be a bit more flexible.
> How about your rewrite taking place in a branch under openid4java, in
> a manner similar to Debian's testing and stable releases? Once the
> new version is polished and stable, it can be packaged and released
> as "v2 stable".
sounds good.
> The things that I would like to keep from the current implementation:
> - simple to use for the web developers
> - good installation and usage documentation
> - same external API, if/where possible (thinking upgrade here)
> - Java 1.4 (preference rather than a major issue; not sure how
> heavily you rely on Java 1.5 and how many people out there are still
> on 1.4, but if there's demand a 1.4 port should not be too hard to
> do).
I'll initially address these by describing the use-case I'm currently
working with. The Shibboleth 2.0 IdP is currently designed such that
every major component is a separate entity with little to no direct
dependence on any others...
- The ProtocolHandlerManager manages multiple ProtocolHandlers.
Each handler understands some protocol that is used on the wire...
SAML1, SAML2, ADFS, WS-Trust, OpenID whatever.
- The RelyingPartyConfigManager deals with information about the
entity on the other end of the wire... in SAML this is metadata, in
OpenID this would likely be XRDS.
- The AttributeResolver provides attributes about the current user.
These could come from anywhere like a relational database, LDAP
directory, or flat file. At a later point, these attributes are
encoded into protocol specific formats, like a SAML2 attribute, etc.
- The AttributeFilterEngine takes attributes from the
AttributeResolver and uses logic to decide which attributes get
released to which relying parties under which conditions.
- Then you have lots of internal things like a StorageService,
MessageDecoders, SessionManagers, TrustEngine etc.
In order to properly integrate this plugin I want to write, I need to
be able to separate the component which deals with OpenID attributes
(SReg & AX) and plug it in as encoders to the Attribute Resolver. I
need to take the discovery code and plug it into the
RelyingPartConfigManager. I need to take the Diffie-Hellman
validation code and plug it into the TrustEngine. Basically, I need
the code to be far more flexible than 99% of users will ever care about.
Shibboleth components are wired together using Spring's IoC container,
and I'll most certainly use the same for my plugin. However, if all
the components are well defined, a fairly lightweight manager class
would build everything and wire it together. This would serve the
same purpose as the current ConsumerManager and SessionManager, but
would be far lighter-weight since all the heavy lifting is done within
the individual components. Would the manager have exactly the same
external API as the current code? probably not exactly... it's hard
to say at this point, but if we minimize the points of contact that
are required, migration should be fairly trivial.
Documentation is a given, as far as I'm concerned.
I'm relying on Java 1.5 pretty heavily right now for generics, new for
loop, and enums. I don't think I've done anything that can't be
addressed with retroweaver if 1.4 is a requirement.
I don't want anyone to misinterpret what I'm saying to suggest that
I'm wanting the design of Shibboleth to dictate the design of
openid4java... that is certainly not the case. I do believe however
that Shibboleth provides a very good test case for the flexibility of
the library. I think if it is designed well as a whole, and a couple
of good Manager classes are provided, openid4java could easily address
both extremes of use cases.
-will