jira
jira copied to clipboard
Validate param prevents authentication, even though it should not
Describe the bug
When using validate
param it fails to authenticate, even though it should not.
To Reproduce
1. Generate a token
2. JIRA(basic_auth=(<email>,<token>),options={'server': url,'agile_rest_path': 'agile',},max_retries=0,validate=True,)
3. You should get jira.exceptions.JIRAError: Login failed
1. Generate a token or use the same token from above
2. jira_auth = JIRA(basic_auth=(<email>,<token>),options={'server': url,'agile_rest_path': 'agile',},max_retries=0,)
3. Login successful -> jira_auth.projects() should return a list of projects
Expected behavior
I would expect validate=True
to fail only if email or token is incorrect
Stack Trace
*** jira.exceptions.JIRAError: JiraError HTTP 401 url: https://<instance>/rest/auth/1/session
text: Login failed
response headers = {'Server': 'AtlassianProxy/1.15.8.1', 'WWW-Authenticate': 'JIRA REST POST, OAuth realm="https%3A%2F%<instance>"', 'Cache-Control': 'no-cache, no-store, no-transform', 'Content-Type': 'application/json;charset=UTF-8', 'Strict-Transport-Security': 'max-age=315360000; includeSubDomains; preload', 'Date': 'Tue, 11 Aug 2020 08:59:57 GMT', 'ATL-TraceId': 'aa0a61d3ea36daf9', 'X-AREQUESTID': '12f6ba79-684e-4d4c-b2ed-5d6a2598a3de', 'X-AACCOUNTID': '557058%3Af4b2bb21-261e-4623-9ad6-fd3a087cbbce', 'X-XSS-Protection': '1; mode=block', 'Transfer-Encoding': 'chunked', 'Timing-Allow-Origin': '*', 'X-Content-Type-Options': 'nosniff', 'Micros-Issuer': 'micros/edge-authenticator', 'Connection': 'keep-alive', 'Set-Cookie': 'atlassian.xsrf.token=abc2e086-300f-4fda-9f72-a5237537b05b_8a2c6b656d38311e461b73185f288414a4f7d0a0_lin; Path=/; Secure', 'Expect-CT': 'report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/global-proxy", enforce, max-age=86400'}
response text = {"errorMessages":["Login failed"],"errors":{}}
Version Information
Python Interpreter: Python 3.6.9
jira-python: jira==2.0.0
OS: NAME="Ubuntu" / VERSION="19.10 (Eoan Ermine)"