ECMA to access SubjectCanonicalizationContext in Resolver

Michael A Grady mgrady at unicon.net
Tue Nov 10 22:59:03 EST 2015


> 
> What V2 used to do with Velocity expressions that didn't match anything provided was just echo them as strings, so you'd get $rawUsername.get(0) in your LDAP search, which doesn't match anything. Maybe not ideal, but it does what you'd expect.
> 
> If it's not doing that, the behavior changed, but you probably could work around it with a more complex Velocity macro with a conditional expression testing for something. But I'd still like to understand what it's doing.
> 

When rawUsers had no values (I was only catching the fact that the subContext didn't exist, and putting a debug message to the log), I got the following error from the LDAP DC, which stopped any "normal" resolution from happening:

2015-11-11 02:41:27,197 - DEBUG [net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:310] - Attribute Resolver 'ShibbolethAt
tributeResolver': Resolving data connector myLDAPc14n
2015-11-11 02:41:27,223 - ERROR [net.shibboleth.idp.saml.profile:-2] - Uncaught runtime exception
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'get' in  class java.util.ArrayList threw exception java.la
ng.IndexOutOfBoundsException: Index: 0, Size: 0 at ee577e47-5169-4361-b573-7ccabe19032a[line 1, column 19]
        at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:243)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)


--
Michael A. Grady
IAM Architect, Unicon, Inc.



More information about the dev mailing list