Support for RequestedAttributes AuthnRequest extension

Description

An extension [1] was ratified to embed a RequestedAttributes array in an AuthnRequest extension as a dynamic signal for attributes during SSO. We have the machinery to process this already in place so it's probably not a ton of work to support this. The expedient thing may be to just simulate the use of an AttributeConsumingService by perhaps manufacturing a fake one to embed in an AttributeConsumingServiceContext.

By spec, the use of an AttributeConsumingServiceIndex overrides this extension. If we extend the existing action bean that pulls out the index and have it mock up an AttributeConsumingService the support is likely automatic.

[1] https://lists.oasis-open.org/archives/security-services-comment/201709/msg00000.html

Environment

None

Activity

Show:

Rod WiddowsonJune 20, 2018 at 8:56 AM

The context is in API and really, life is too short.

I made the obvious fix, tidied up logging and also remove a spurious fatal error that my own review spotted.

Less is always more and this is now much less than I originally had.

Scott CantorJune 19, 2018 at 3:57 PM

All our impl classes inherently depend on each other's contracts, but if it really bugs you, add a flag to the context class to track whether the node processor has to do work.

Rod WiddowsonJune 19, 2018 at 3:25 PM

I had thought of that but I thought it might be a bit nauseating to others to do work based on knoweldge of how an impl class elsewhere has behaved...

I suppose one can rationalize it away (Generated metadata won't have a parent and metadata from a source will).

If you () don't mind this change I'll add it - and if hates it too much we can take it to the dev list

Scott CantorJune 19, 2018 at 3:17 PM

I bet you could fix that, just do a quick check of whether the ACS object has a parent (in which case it's from metadata).

Rod WiddowsonJune 19, 2018 at 3:13 PM
Edited

Changes made as described above. IMO the code is much cleaner.

There is a small extra cost on each processing when the AssertionConsumerService does come from the Metadata, and had RequestedAttribute statements but they do not map onto any IdP attributes (because we cannot detect that the mapping has already happened)

In this case we will duplicate the attempt to map the attributes - this will be the cost of iterating across all the mappers (i.e attribute encoders) looking for a mapping for the RequestedAttribute in the AssertionConsumerService.

I don't think that the condition is common and the cost should be minimal, but it is a worrying O(n * m) complexity.

The "fix" would be to revert to the old code but that it architecturally sucky (IMO)

Fixed

Details

Assignee

Reporter

Original estimate

Fix versions

Created September 13, 2017 at 5:32 PM
Updated October 10, 2018 at 3:12 PM
Resolved August 20, 2018 at 7:17 PM