View request/response headers in logs

Erik Macias September 11, 2019

Hi, 

Is it possible to view the Request and Response headers that Jira is receiving/sending in the logs?

As of now, I am only aware of the access_logs file for this type of information. However, the data in the logs does not include the headers (not all, and not the ones we are most interested in. 

IP_ADDRESS 936x52140x1 USER [05/Sep/2019:18:03:34 -0400] "POST /rest/api/2/issue HTTP/1.1" 401 - 0 "-" "Apache CXF 2.7.18" "-"  

Most of the time the "USER" is not even given (although we know who the user is, as we are testing this POST in a lower environment and tail the logs as we test).

This API call is coming from a Java Spring app. 

 

Thanks,

Erik 

2 answers

1 accepted

2 votes
Answer accepted
Erik Macias September 13, 2019

In case someone stubbles across this post in the future, what worked for me was the following:

  • Enable HTTP Access Logging from Administration - > System - > logging and profiling
    • Enabled HTTP dump as well
  • Adding org.apache.http to Default Loggers
    • Click on the 'Configure logging level for another package' link
    • Set the logging level to TRACE,
      • That low of a level may not be needed (haven't tested the other levels)

The file that contained the desired information was stored in 'atlassian-jira-http-dump.log'.

Please note that the above configurations where implemented on a test instance (not production) and were reset after the logs were captured. This does log a lot of information so it is suggested that you disable the package by setting the logging level to OFF after  testing.

0 votes
c_john_mmstudio-john_de
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 6, 2024

Hallo Eric, 

thanks for your quick reply. I figured out, that our Provider set up an new header-config in HTTPS-Proxy for Authentication with Basic Auth

> RequestHeader unset "Authorization" 

If we temporary remove this, everthing works except the basic auth. If we unset the Request header while proxing everything works except this plugin. 

Difficult because of security issue.

Thanks. Christian

Suggest an answer

Log in or Sign up to answer