All queries getting executed

Mathew, Sunil smathew at hbs.edu
Fri Dec 9 09:33:03 UTC 2022


Thanks, I added activationConditionRef to DataConnector and it seems to be working.

attribute-resolver.xml:
    <DataConnector id="entDB" xsi:type="RelationalDatabase" activationConditionRef="entDBCondition">
        <ContainerManagedConnection resourceName="java:comp/env/jdbc/idpDS" />
        <QueryTemplate>
            <![CDATA[
select givenname as GIVENNAME, surname as SURNAME, surname || ', ' || givenname as FULLNAME,
nvl(HBS_EMAIL, LEFA_EMAIL) as VALUE,
SUBSTR(nvl(HBS_EMAIL, LEFA_EMAIL), 0, INSTR(nvl(HBS_EMAIL, LEFA_EMAIL), '@')-1) AS USERNAME from (
select a.pref_first_name  as givenname,  a.pref_last_name as surname,
(select value from BV_INET_ADDR where nvl(END_DATE,SYSDATE)>=SYSDATE
and PRIMARY_ADDR_TYPE_FLAG='T'
and HBS_FLAG='T'
and ADDR_SUBTYPE_CODE = 'EM'
AND PRSN_ID=a.prsn_id) AS HBS_EMAIL, (select value from BV_INET_ADDR where nvl(END_DATE,SYSDATE)>=SYSDATE
and PRIMARY_ADDR_TYPE_FLAG='T'
and HBS_FLAG='T'
and ADDR_SUBTYPE_CODE = 'LF'
AND PRSN_ID=a.prsn_id) AS LEFA_EMAIL
from bt_prsn a
where a.PRSN_ID= $resolutionContext.principal
)
            ]]>
        </QueryTemplate>

        <Column columnName="VALUE" attributeID="VALUE"/>
        <Column columnName="GIVENNAME" attributeID="GIVENNAME"/>
        <Column columnName="SURNAME" attributeID="SURNAME"/>
        <Column columnName="FULLNAME" attributeID="FULLNAME" />
        <Column columnName="USERNAME" attributeID="USERNAME" />
    </DataConnector>

services.xml:

    <!-- entDB -->

    <bean id="entDBCondition" parent="shibboleth.Conditions.OR">

        <constructor-arg>

            <list>

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="urn:mace:saml:pac4j.org" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://cas-tomcat-stage.myhbx.org/hbssso" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://cas-tomcat-stage.myhbx.org/hbssso/hbsssov2" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://hbstest.mediaspace.kaltura.com/" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://adminhbs.mediaspace.kaltura.com" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://sso.kaltura.com/s/module.php/saml/sp/metadata.php/1892511_kmc" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://sso.kaltura.com/s/module.php/saml/sp/metadata.php/1892511_kms" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://givitas.com/sp" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://hbs-test.hosted.panopto.com/Panopto/Pages/Auth/Login.aspx" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://exedhousing-dev.hbs.edu/StarRezWebTEST/" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://hbs.starrezhousing.com/StarRezPortalXDev/" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="https://hbs.starrezhousing.com/StarRezWebDev/" />

            </list>

        </constructor-arg>

    </bean>

Sunil


From: users <users-bounces at shibboleth.net> on behalf of Lipscomb, Gary via users <users at shibboleth.net>
Date: Thursday, December 8, 2022 at 7:09 PM
To: Shib Users <users at shibboleth.net>
Cc: Lipscomb, Gary <glipscomb at csu.edu.au>
Subject: RE: All queries getting executed
Hi Sunil,

It would be done in the attribute-resolver.xml file
See
https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1265631564/DataConnectorConfiguration#Reference<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fshibboleth.atlassian.net%2Fwiki%2Fspaces%2FIDP4%2Fpages%2F1265631564%2FDataConnectorConfiguration%23Reference&data=05%7C01%7Csmathew%40hbs.edu%7Ca494a20c9de74d2a1abc08dad979a7dd%7C09fd564ebf4243218f2db8e482f8635c%7C0%7C0%7C638061413794634090%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=kFGePWnS6mGGhgkDrL2%2BGv0nXZATqsAiu%2Fnk9F8AVm8%3D&reserved=0>

regards
Gary


From: users <users-bounces at shibboleth.net> On Behalf Of Mathew, Sunil via users
Sent: Friday, 9 December 2022 10:58
To: Cantor, Scott <cantor.2 at osu.edu>; Shib Users <users at shibboleth.net>
Cc: Mathew, Sunil <smathew at hbs.edu>
Subject: Re: All queries getting executed

Thanks Scott. I saw documentation for activationCondition in services.xml, for example,


    <!-- Canvas -->

    <bean id="CanvasCondition" parent="shibboleth.Conditions.OR">

        <constructor-arg>

            <list>

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="http://hbs-dev.instructure.com/saml2<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhbs-dev.instructure.com%2Fsaml2&data=05%7C01%7Csmathew%40hbs.edu%7Ca494a20c9de74d2a1abc08dad979a7dd%7C09fd564ebf4243218f2db8e482f8635c%7C0%7C0%7C638061413794634090%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VqgqWW1e4%2FUS7p5aYFr7zZyj5FmdvKhyNkKoz57%2Ft4o%3D&reserved=0>" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="http://hbs-int.instructure.com/saml2<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhbs-int.instructure.com%2Fsaml2&data=05%7C01%7Csmathew%40hbs.edu%7Ca494a20c9de74d2a1abc08dad979a7dd%7C09fd564ebf4243218f2db8e482f8635c%7C0%7C0%7C638061413794634090%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=i3YBCknHVkVLPpZlTNVEI9b7nkif9iGFsbpvjcGfFZA%3D&reserved=0>" />

                <bean parent="shibboleth.Conditions.RelyingPartyId" c:candidate="http://hbs.instructure.com/saml2<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhbs.instructure.com%2Fsaml2&data=05%7C01%7Csmathew%40hbs.edu%7Ca494a20c9de74d2a1abc08dad979a7dd%7C09fd564ebf4243218f2db8e482f8635c%7C0%7C0%7C638061413794634090%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Hq%2FM9dUcXnhXJD8GMv0wI2kUtGwSsa2TI6HEX3iHfcY%3D&reserved=0>" />

            </list>

        </constructor-arg>

    </bean>

Can you please let me know how to use activation condition to limit queries from getting executed in relying-party.xml?

Sunil


From: Cantor, Scott <cantor.2 at osu.edu<mailto:cantor.2 at osu.edu>>
Date: Thursday, December 8, 2022 at 6:29 PM
To: Shib Users <users at shibboleth.net<mailto:users at shibboleth.net>>
Cc: Mathew, Sunil <smathew at hbs.edu<mailto:smathew at hbs.edu>>
Subject: Re: All queries getting executed
>, We have an issue where all queries defined in attribute-resolver. xml is
> getting executed even though they are not defined in attribute-filter. xml for
> that endpoint

You have a misunderstanding. Filtering does not prevent anything, it's after the fact. Resolution always resolves everything, it's up to the activation conditions there attached to various things to actually limit something running.

-- Scott






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20221209/4521902d/attachment.htm>


More information about the users mailing list