The AttributeInMetadata type is a Matcher which filters results based on <md:RequestedAttribute> elements within the request-indicated <md:AttributeConsumingService> in the SP's metadata. The parameterization controls:
Whether the <md:RequestedAttribute> naming is applied directly or indirectly via the AttributeRegistryConfiguration (the former is indicated by use of attributeName and attributeNameFormat)
The behavior when the metadata contains no <md:RequestedAttribute> elements (via matchIfMetadataSilent)
The behavior with respect to the isRequired XML attribute
Whether this is a Matcher or a PolicyRule (via attributeID)
Value matching is supported but is purely string-based. Only string attribute values of the input attribute are inspected and they are compared with a string representation of each of the values in the RequestedAttribute. Only matching values are added to the Permit or Deny List.
If this attribute is present, a <md:RequestedAttribute> element with this Name is searched for. If this attribute is not present, then the appropriate decoded IdP Attribute(s) indicated by the AttributeRegistryConfiguration are consulted instead.
If this attribute is present, provides additional filtering of the <md:RequestedAttribute> information, such that it will only be matched if one of the following conditions is true:
The value of attributeNameFormat attribute matches the value of the NameFormat XML attribute or
The NameFormat XML attribute is not present or
The value of the NameFormat XML attribute is urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
The attributeNameFormat attribute is ignored if attributeName is not present.
If true then all input values are returned if the metadata contains no <md:RequestedAttribute> or decoded attribute information
If this is true and the corresponding <md:RequestedAttribute> element does not specify isRequired="true" , then no values are matched
If this attribute is present, then this is a PolicyRule returning true if the Matcher, when applied to the attribute with this ID, matches any values. See AttributeValueString for an exmaple of how attributeID changes the meaning of a Matcher in a slightly less daunting scenario.
Suppose an SP has the following requested attributes in metadata:
Then an IdP with the following configuration will release the indicated wire attributes to the above SP provided that they are configured with attribute transoding rules that match the SAML naming above.