Uncaught runtime exception on scripted attribute resolution

Francesco Malvezzi francesco.malvezzi at unimore.it
Fri Sep 6 11:59:13 UTC 2024


On 06/09/24 12:31, Rod Widdowson wrote:
> What does your attribute-resolver.xml look like?  In particular the activation conditions on you your data connectors are causing
> the problems - There is a StrategyIndirectedPredicate in there that doesn't  think its complete configured.  Or something similar.
> 
> Turning up logging for net.shibboleth.idp.attribute.resolver to debug might also be instructive.

yes!

2024-09-06 13:10:53,681 - 155.185.3.38 - DEBUG 
[net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:196] - 
Attribute Resolver 'ShibbolethAttributeResolver': Initiating attribute 
resolution with label: null
2024-09-06 13:10:53,686 - 155.185.3.38 - DEBUG 
[net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:240] - 
Attribute Resolver 'ShibbolethAttributeResolver': Attempting to resolve 
the following attribute definitions [unimoreTotpSeed]
2024-09-06 13:10:53,687 - 155.185.3.38 - DEBUG 
[net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:446] - 
Attribute Resolver 'ShibbolethAttributeResolver': Resolving dependencies 
for 'unimoreTotpSeed'
2024-09-06 13:10:53,688 - 155.185.3.38 - DEBUG 
[net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:446] - 
Attribute Resolver 'ShibbolethAttributeResolver': Resolving dependencies 
for 'myLDAP'
2024-09-06 13:10:53,689 - 155.185.3.38 - DEBUG 
[net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:455] - 
Attribute Resolver 'ShibbolethAttributeResolver': Finished resolving 
dependencies for 'myLDAP'
2024-09-06 13:10:53,689 - 155.185.3.38 - DEBUG 
[net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:399] - 
Attribute Resolver 'ShibbolethAttributeResolver': Resolving data 
connector myLDAP
2024-09-06 13:10:53,696 - 155.185.3.38 - ERROR 
[net.shibboleth.idp.authn:35] - Uncaught runtime exception
java.lang.NullPointerException: Cannot invoke 
"java.lang.CharSequence.length()" because "this.text" is null
         at 
java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1769)
2024-09-06 13:10:53,709 - 155.185.3.38 - WARN 
[org.opensaml.profile.action.impl.LogEvent:94] - A non-proceed event 
occurred while processing the request: RuntimeException

And exactly as you pointed out, myLDAP has an activation condition:

<bean id="shibboleth.usernameIsACF" 
parent="shibboleth.Conditions.SubjectName">
         <constructor-arg>
             <bean class="com.google.common.base.Predicates" 
factory-method="containsPattern"
                   c:pattern="^[A-Z0-9]{16}$" />
         </constructor-arg>
     </bean>

which matches very closely the classes refernced in the stack trace!

Removing the activationCondition, lets all work just great.

Thank you so much for the right pointer: now it's up to me to study,

Francesco



More information about the users mailing list