ECMA to access SubjectCanonicalizationContext in Resolver

Michael A Grady mgrady at unicon.net
Tue Nov 10 23:08:41 EST 2015


> On Nov 10, 2015, at 9:59 PM, Michael A Grady <mgrady at unicon.net> wrote:
> 
> 
>> 
>> 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)
> 
> 

Actually, looking back, the other DC had run fine, then it tried the one using rawUser, and produced the above message in the log, and gave me the following in my browser:

Web Login Service - Uncaught Exception

A software error was encountered that prevents normal operation:


org.apache.velocity.exception.MethodInvocationException: Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at 0a54171e-a569-4cb4-8274-f1867fb1d3db[line 1, column 19]

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



More information about the dev mailing list