include statements in xml configuration files?
Wessel, Keith
kwessel at illinois.edu
Fri Feb 19 17:24:58 UTC 2021
Okay, so perhaps I'm overthinking this. Could we do something like this inside the entity attribute filter block of metadata-providers.xml?
<ConditionScript customObjectRef="GithubRegexMatch">
<Script>
<![CDATA[
(input.getEntityID().match(/^https:\/\/github\.com\/orgs\//) != null);
]]>
</Script>
</ConditionScript>
That, to me, looks like it's taking an entity descriptor as input and returning true if the regex matches, false otherwise. But it feels too simple.
Keith
-----Original Message-----
From: users <users-bounces at shibboleth.net> On Behalf Of Cantor, Scott
Sent: Friday, February 19, 2021 11:03 AM
To: Shib Users <users at shibboleth.net>
Subject: Re: include statements in xml configuration files?
On 2/19/21, 10:57 AM, "users on behalf of Wessel, Keith" <users-bounces at shibboleth.net on behalf of kwessel at illinois.edu> wrote:
> In that case, I'm not seeing a pre-made bean to do this. I'm assuming it would be in system/conf/utilities.xml where all
> of the other pre-made condition beans live. Is there somewhere else we should be looking?
I wasn't suggesting a bean existed, I was saying a class might.
> If not, can you point us to another config that might have a similar condition script that does what we want here? Doing
> the getEntityID.match part is easy, but I'm not exactly sure how to set the results in the type of predicate that the entity
> attribute filter is looking for.
The results of a predicate are true or false. Maybe I'm not getting what you're asking.
If you're talking about what Chris is talking about, that has built-in utilities to adapt things for you.
shibboleth.Conditions.EntityDescriptor is a bean that takes a constructor argument that's a Predicate<EntityDescriptor>, and it will feed it the right input from the surrounding context.
There are examples of that in the wiki I believe.
-- Scott
--
For Consortium Member technical support, see https://urldefense.com/v3/__https://wiki.shibboleth.net/confluence/x/coFAAg__;!!DZ3fjg!o26Nh6CUfFAIJ_8cbdE9dPGYioVf9CqZq1An7iASlYptTQB940Asp6NBsO8dvRqAwQ$
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
More information about the users
mailing list