-
-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dont replace jira url #1913
Comments
We’re experiencing a very similar issue in our setup! We also use Nginx as a proxy for Jira with IP whitelisting, and have noticed the URL handling seems inconsistent, which causes authentication errors like the 401 Unauthorized you mentioned. It would be great if the Jira team could help clarify or address this behavior. Thanks for sharing your experience—it’s helpful to know we’re not alone with this issue! |
We also hit this, in our case. To reach jira from a server, you have to use a proxy address, but in some of the helper methods, they use the address returned on the issue object. My specific use case was in the To get around it in our local testing we used the
The above code would fail due to the wrong jira address being used. To fix it, we added the following to https://github.com/pycontribs/jira/blob/main/jira/resources.py#L329
This obviously very specific to the resource.py, but it may be adapted to other parts of the code. |
This can actually be achieved with the already included methods of the class Resource a bit more precise
I'll put in a PR for discussion/review |
We are now bypassing this by substituting the correct link through self.self, but this does not seem to be the right solution. |
if opening a pr , do know we'd like to have it tested. This repo is not under active development and maintained by volunteers. As you can see prs get merged slowly. We cheer to contributors wanting to do the effort of creating a PR but ask for patience ... and a short bump once in a while :-) this is by far our main project |
aha a PR was created, => we need to get deployment working first though. https://github.com/pycontribs/jira/pull/1925/files |
Linting hopefully fixed 😃 |
Bug summary
Hi there,
In our company, API access is provided through a white list system.
To "fix" IP addresses, we use Nginx as a proxy server for accessing Jira.
However, we have noticed that when we use the connection.issuel), in the dictresource method, the URL is replaced with one that Jira returns, rather than the one from which the request originated. Additionally, when updating issues using the issue.update method, the URL used is not the one that the authorization was initiated from, but rather the one provided by the Jira server.
Due to this, when attempting to update a task, we receive a 401 unauthorized error. We are hoping to resolve this issue and ensure that the correct URL is used for all API requests.
Could you please assist us in resolving this issue? We would greatly appreciate any assistance you can provide. Thank you in advance for your attention.
Is there an existing issue for this?
Jira Instance type
Jira Server or Data Center (Self-hosted)
Jira instance version
8.20.0
jira-python version
3.5.2
Python Interpreter version
3.11
Which operating systems have you used?
Reproduction steps
Stack trace
Expected behaviour
The Jira URL has not been replaced, but the one that was used for authorization is still being used,
Additional Context
No response
The text was updated successfully, but these errors were encountered: