Proxy IdP + activationConditions

Mak, Steve makst at
Tue Jan 19 16:16:26 UTC 2021

So I think I need some more help with proxy IdP, this time I'm trying to do some activation conditions.

When proxy idp attributes come back (this is working), I'm trying to join with data we have locally from a DataConnector (db containing entitlements) and then do an activationCondition on the local entitlement to use for controlling whether we allow the proxy idp attributes resolve into attributes for the service. So far everything works except the activation condition isn't properly denying my attributes and I think I'm doing something wrong.

Flow logic:
	proxy attributes received > resolve proxy subject > build data connector results using proxy subject as $resolutionContext.principal > resolve epe-proxy > resolve idp attributes if activationCondition is true > build SAML assertion/response

Config below (somewhat redacted) --

proxy subject:
    <AttributeDefinition id="subject-proxy" xsi:type="SubjectDerivedAttribute" forCanonicalization="true" principalAttributeName="proxy-employeeNumber"/>

Data connector:
    <DataConnector id="entitlements-for-proxy" xsi:type="RelationalDatabase">
                SELECT "EMP_NUM", "GROUP_NAME" AS "EPE"
                WHERE "EMP_NUM" = (regexp_match('$resolutionContext.principal','(^[0-9]+$)'))[1]::bigint;
        <Column columnName="EMP_NUM" attributeID="employeeNumber"/>
        <Column columnName="EPE" attributeID="eduPersonEntitlement"/>
        <ResultCache expireAfterWrite="PT15M"/>

entitlement created locally:
    <AttributeDefinition id="epe-proxy" xsi:type="Simple" activationConditionRef="ProxyPerson">
        <InputDataConnector ref="entitlements-for-proxy" attributeNames="eduPersonEntitlement"/>
        <AttributeEncoder xsi:type="SAML2String" name="urn:oid:" friendlyName="eduPersonEntitlement" nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"/>

Activation condition in global.xml or new file loaded via services.xml:
    <bean id="ProxyPerson" parent="shibboleth.Conditions.AND">
            <bean parent="shibboleth.Conditions.OR">
                        <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="{redacted - service 1}"/>
                        <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="{redacted - service 2}"/>
            <bean class="net.shibboleth.idp.profile.logic.SimpleAttributePredicate" p:useUnfilteredAttributes="true">
                <property name="attributeValueMap">
                        <entry key="epe-proxy">
                                <value>{redacted - specific entitlement value to check}</value>

More information about the users mailing list