Disable SubjectLocality

Santiago Núñez - Sistemas Criticos snunez at sistemascriticos.com
Thu Oct 20 16:40:50 UTC 2022


I don't know much about beans or functions and few about java or tomcat ....
I just added <bean id="shibboleth.SubjectLocalityAddressStrategy"
parent="shibboleth.Functions.Constant" c:target="" /> at global.xml
file.....

For what I tested, what I put on c:target is returned as the SubjectLocality
tag.
If instead I set: <bean id="shibboleth.SubjectLocalityAddressStrategy"
parent="shibboleth.Functions.Constant" c:target="TEST" />, then I get
<SubjectLocaly Address="TEST"> 
As I understand, a string is returned, and if c:target is set to  "" and
empty string is returned.

How do I set the bean to return null instead of a string? 

Thanks
--SN

>    The tag  has no value,  but it is still present.

I don't believe that to be possible based on the code but bugs can't ever be
ruled out of course. It certainly sounds like one, but I can't see any way
that this code could produce that outcome:

        final String address =
getAddressLookupStrategy().apply(profileRequestContext);
        if (address != null) {
            final SubjectLocality locality = localityBuilder.buildObject();
            locality.setAddress(address);
            statement.setSubjectLocality(locality);
        } else {
            log.debug("{} Address not available, omitting SubjectLocality
element", getLogPrefix());
        }

My guess is your function is not returning null. If you don't see the debug
message with logging adjusted, then there's really no doubt of it.

-- Scott


-- 
For Consortium Member technical support, see
https://shibboleth.atlassian.net/wiki/x/ZYEpPw
To unsubscribe from this list send an email to
users-unsubscribe at shibboleth.net



More information about the users mailing list