I figured out what the problem was. The principal expression and filter expression have to be on the same line as the opening tag. So while this does not work: <principalExpression> authentication.getPrincipal().getRoles().any{ it.getRoleName() in ['SANDMINE'] } </principalExpression> This works just fine: <principalExpression>authentication.getPrincipal().getRoles().any{ it.getRoleName() in ['SANDMINE'] }</principalExpression>