SP v4 alpha2 agent.ini attribute-mappings ?

Jarno Huuskonen jarno.huuskonen at uef.fi
Mon Jul 13 14:37:35 UTC 2026


Hello,

Should this agent.ini [attribute-mappings] work:
[attribute-mappings]
samlSubjectID = SHIB_subject_id
samlPairwiseID = SHIB_pairwise_id
eduPersonAssurance = SHIB_eduPersonAssurance
eduPersonEntitlement = SHIB_entitlement

(There's no [attribute-configurations] and request-map.xml has no
attribute settings).

In my tests the above [attribute-mappings] settings are ignored, I
think this happens because:
(shibsp/attribute/impl/DefaultAttributeConfiguration.cpp:L117)
void DefaultAttributeConfiguration::init(const ptree& pt)

in line 161:
    boost::optional<ptree&> mappings =
m_pt.get_child_optional(MAPPINGS_PROP_SECTION_NAME);
    if (!mappings) {
        return;
    }

is searching for get_child_optional(MAPPINGS_PROP_SECTION_NAME) from
"m_pt" and not from pt. (init(pt); is called from L102, and m_pt is
probably empty at that point).
(if I set m_pt = pt; before init(pt); kind of "works", put probably is
not correct).

(Same empty settings happens with
m_pt.get_child_optional(SETTINGS_PROP_SECTION_NAME); L140)

Putting [attribute-mappings] to for example attributes.ini and having
[attribute-configurations]
custom = attributes.ini

seems to work because
DefaultAttributeConfiguration::DefaultAttributeConfiguration(const
char* pathname)(L114) uses/initializes m_pt.

-Jarno

-- 
Jarno Huuskonen


More information about the users mailing list