If you are having trouble authenticating to JIRA or a web application, it can be useful to log the details of all HTTP request headers that are being sent to the web application. If your application server is Tomcat, you can do this with the Request Dumper Valve.
Add the following entry to the <Engine> section of your Tomcat conf/server.xml file:
Then restart JIRA.
You will get lots of entries like the following in your logs/catalina.out log file: