The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Kerberos login stopped working in Python scripts[error 401]

Alexey Chistyakov
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 16, 2022

Hello!

jira-python
In my python scripts using JIRA API, kerberos authentication suddenly stopped working(authentication worked for months and then suddenly stopped working in the evening).

There was no update of the python libraries. Error occurs on different versions of the python jira library, on different hosts and for different jira(and kerberos) users.

Curl can log into JIRA using kerberos!!!

Im using standard library connection:

JIRA(server=jira_server, kerberos=True)

ERROR:

File "...\func.py", line 11, in jira_connect
jira_con = JIRA(server=jira_server, kerberos=True)
File "...\venv38\lib\site-packages\jira\client.py", line 506, in __init__
si = self.server_info()
File "...\venv38\lib\site-packages\jira\client.py", line 2551, in server_info
j = self._get_json("serverInfo")
File "...\venv38\lib\site-packages\jira\client.py", line 3139, in _get_json
r = self._session.get(url, params=params)
File "...\venv38\lib\site-packages\jira\resilientsession.py", line 174, in get
return self.__verb("GET", url, **kwargs)
File "...\venv38\lib\site-packages\jira\resilientsession.py", line 170, in __verb
raise_on_error(response, verb=verb, **kwargs)
File "...\venv38\lib\site-packages\jira\resilientsession.py", line 54, in raise_on_error
raise JIRAError(jira.exceptions.JIRAError: JiraError HTTP 401 url: http://*.com/rest/api/2/serverInfo
text: {"baseUrl":"http://*.com","version":"*","versionNumbers":[*],"deploymentType":"Server","buildNumber":*,"buildDate":"*","databaseBuildNumber":*,"scmInfo":"*","serverTitle":"Jira"}

response headers = {'X-AREQUESTID': '*', 'x-anodeid': '*', 'referrer-policy': '*', 'X-XSS-Protection': '*', 'X-Content-Type-Options': '*', 'x-frame-options': '*', 'content-security-policy': '*', 'strict-transport-security': '*', 'set-cookie': '*', 'x-asessionid': '*', 'X-AUSERNAME': '*', 'cache-control': '*', 'content-encoding': '*', 'vary': '*', 'Content-Type': 'application/json;charset=UTF-8', 'transfer-encoding': 'chunked', 'date': 'Wed, 16 Feb 2022 10:28:10 GMT'}
response text = {"baseUrl":"http://*.com","version":"*","versionNumbers":[*],"deploymentType":"Server","buildNumber":*,"buildDate":"*","databaseBuildNumber":*,"scmInfo":"*","serverTitle":"Jira"}






1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Entonsky
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 17, 2022

Same problem with confluence rest api. Kerberos autentification stop work. Basic autentification works well in the same time. 
The problem is not in JIRA (or CONFLUENCE) module. I've tried with requests python lilbrary.  No autentification received. 

Autentification stopped working a couple days ago.

Manvisha Kodali
July 25, 2022

by any chance, did you get it working with Kerberos authentication?