BZ-1069781 - REST operations returns 401 on Tomcat 7 configured with JAAS

(cherry picked from commit e2fcc416b7718bb8939eecd991db634398f17973)