Reverse attribute mapping..
Rod Widdowson
rdw at steadingsoftware.com
Tue Sep 24 06:01:45 EDT 2013
> We currently use "IdPSession" for the primary session object, I think we
> should move to IdPAttribute for the internal attribute case.
I agree - it gets too confusing and at a purely aesthetic level things like
public abstract class AbstractSAMLAttributesMapper
<InType extends org.opensaml.saml.saml2.core.Attribute, OutType
extends Attribute>
implements AttributeMapper<InType, OutType>
are hideous (plus eclipse doesn't line break them properly so you always get
checkstyle warnings after an autoformat)
Anyone objections to this? It strikes me that this will be a wide ranging
checkin so it might serve as a test for the capitalization change process.
Why don't I try this: Once I have the change ready I'll give people a 24
hour heads-up to check-in any things they have - or to veto my check-in. To
be honest I think that this might be overegging things - this sort of change
is likely to merge up just dandy.
> Reinforced by the fact that you actually call it IdPAttribute here. ;-)
What the man said !
> Is it circular if it's just a test dependency?
Yes, and that is only because I quailed at the thought of creating the test
input structure by hand in java - much easier to use the parser to do it.
> >2) Move some of idp-attribute-mapper-* into idp-saml-* (or move the
> >attribute encoders into idp-attribute-mapper). This may well introduce
> >other circularity (the resolver definition needs to depend on the
> >attribute
> >encoders, but the attribute mapper depends on the resolver definition).
>
> Well, I was going to say that I'm not sure the mapper functionality right
> now shouldn't be in idp-saml anyway. Is it really general, or is it based
> on the SAML syntax?
Kinda - sorta. I wanted to keep things neutral and so the Interfaces are
independent:
public interface AttributeMapper<InType, OutType extends IdPAttribute>
extends IdentifiableComponent{
public interface AttributesMapper<InType, OutType extends IdPAttribute>
But all the base classes (also in mapper-api) are SAML based. I will be
frank that although I have tried to make things general, without a non SAML
example to play with it is difficult to know whether I have succeeded and
experience may show that this doesn't quite work. I *know* that it works
for the one case we care about (SAMLRequestedAttributes to
IdPRequestedAttributes), the rest might work. So we might want to make the
InType of the interface extend a SAMLAttribute and move the whole thing to
idp-saml.
Alternatively (and this parallels encoding), the interfaces should move to
idp-attribute-api (alongside AttributeEncoder) and the implementations to
idp-saml-api (like AbstractSamlAttributeEncoder) and idp-samp-impl (like
Saml2StringAttributeEncoder). That works quite nicely I think...
More information about the dev
mailing list