Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-72591

Rate limiting to perform agent specific evaluation

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • REST API
    • None
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Issue Summary

      Rate limiting evaluates if the requests are coming from UI by checking some cookies and headers. Some client libraries like https://pypi.org/project/jira/2.0.0/ keeps the cookies set from the server and following requests are evaluated as UI request and rate limiting is not applied. These requests are shown in the access logs as coming from python agent.

      Steps to Reproduce

      1. Use the library specified or send back the cookie set two of cookie/header below
        public static final String HEADER_ORIGIN = "origin";
        public static final String HEADER_REFERER = "Referer";
        public static final String COOKIE_SESSION_ID = "JSESSIONID";
        public static final String COOKIE_CSRF_TOKEN = "atlassian.xsrf.token"
      1. Perform request to rate enabled Jira server
      2. Requests are evaluated as UI and not rate limited

      Expected Results

      Requests coming from specific agents like python are not evaluated as UI requests even if they meet the cookie/header criteria for the UI requests.

      Actual Results

      Requests are not limited and they can be seen as coming from python client in the access logs

      192.168.20.55 272x228079x2 ****** [16/Jun/2021:04:32:05 +0200] "GET /jira/rest/api/2/field HTTP/1.0" 200 12393 161 "-" "python-requests/2.25.1" "1m3clon"
      192.168.20.55 272x228080x2 ****** [16/Jun/2021:04:32:05 +0200] "GET /jira/rest/api/2/field HTTP/1.0" 200 12393 155 "-" "python-requests/2.25.1" "160ga5k"
      

      Workaround

      Only workaround is to make sure client does not send the cookie/header that will make the request evaluated as UI request. 

            Unassigned Unassigned
            6caa153f-0eb9-42d8-a808-28cf334cb30c Deleted Account (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: