Context navigation in the Abstract Profile Actions.

Cantor, Scott cantor.2 at osu.edu
Fri Jan 3 12:48:52 EST 2014


On 1/3/14, 12:39 PM, "Rod Widdowson" <rdw at steadingsoftware.com> wrote:
>
>I'm starting with the Principal which it appears I need to get from the
>SubjectContext.

Yes.

>It looks like the paradigm is to:
>
>1) In the constructor assume the subject context will normally be a child
>of
>the ProfileContext and to set up a default Function<ProfileRequestContext,
>SubjectContext> which does that.

I think I've missed a few of those strategy things in some actions, but by
and large I copied what was already being done.

>3) In the preExecute stage populate a private field with the subject
>context
>located with the function we set up above.
>
>4) In the execute stage use it (by putting the name into the
>AttributeContext which is generated).
>
>Before I start on this I just wanted to check that that would be the
>expected code..

That's what I do. I try to push as much error checking into the preExecute
hook as possible, so there's little or no null checking in the execute
step.

One of the things I think I did wrong was that I was treating the
pre-condition for an action as anything that would cause a real
catastrophic problem, but I think that was a mistake, because nothing
really does. What I should have done was treat that as anything that
prevents a "proceed" event or equivalent. That would do a better job of
documenting I think.

>I suspect that next I will have questions about where to find the other
>Strings (attributeIssuerID, attributeRecipientID,
>principalAuthenticationMethod), but I'll do more code reading before I ask
>that...

Some of that requires consultation with Brent to finalize how the message
processing will work, but right now, I think the best you can do is get
the recipient (in the simple case) from
RelyingPartyContext.getRelyingPartyId(). The issuer ID doesn't get used
much if at all, but it will come from
RelyingPartyContext.getRelyingPartyConfig() I think.

The method is TBD and I would really rather we consider breaking that one
thing. Nobody uses it to my knowledge, and it is no longer a well-defined
concept in the new design.

But if we have to populate it, it's got to come from one of the custom
principals set in the SubjectContext, and I would probably say we'd have
to use an Action on the profile side to set it.

-- Scott




More information about the dev mailing list