To work around this, the resolver can be instructed to resolve a limited set of attributes (and their dependencies) and place the results into an "intermediate" AttributeContext which is stored under the resolution context. A SimpleAttributePredicate (or any other suitable condition object), customized to locate this intermediate AttributeContext, can then be used as an activation condition. A predefined bean named shibboleth.ChildLookup.PreRequestedAttributeContext is provided for this purpose.
You should bear the following in mind:
The intermedate AttributeContext is populated with all pre-requested attributes (and any dependent attribute definitions) regardless of whether the definition is defined as being a dependency-only plugin.
The results of any data connector's resolution are only available if a pre-requested attribute exposes them.
The pre-requested Attributes and all their dependencies are resolved during the pre-request resolution phase. You need to ensure that the DataConnector or Attribute Definition you are guarding with the activation condition does not get resolved 'by accident'.
An activation condition can determine whether the resolution is for a pre-requested Attribute (or its dependency) or not by looking for the child AttributeContext . There will always be a child AttributeContext (even if empty) during main resolution, but there will never be one during pre-request resolution.