Skip to content

Commit 54d6633

Browse files
kevinAlbsvector-of-bool
authored andcommitted
pin to jira commit and use SIGNATURE_RSA
1 parent 18b7436 commit 54d6633

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

etc/make_release.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
from git import Repo # pip install GitPython
4848
from github import Github # pip install PyGithub
4949
from jira import JIRA # pip install jira
50+
import oauthlib.oauth1
5051

5152
if sys.version_info < (3, 0, 0):
5253
raise RuntimeError("This script requires Python 3 or higher")
@@ -425,6 +426,11 @@ def read_jira_oauth_creds(jira_creds_file):
425426
oauth_dict['consumer_key'] = creds_match.group(3)
426427
# Fix the double-backslash created by the decode() call above
427428
oauth_dict['key_cert'] = creds_match.group(4).replace("\\n", "\n")
429+
# Use signature algorithm `SIGNATURE_RSA` to override `jira` default of `SIGNATURE_HMAC_SHA1`.
430+
# `jira` 3.5.1 changed the default signature algorithm to `SIGNATURE_HMAC_SHA1`.
431+
# MongoDB Jira servers do not appear to support `SIGNATURE_HMAC_SHA1`. Using `SIGNATURE_HMAC_SHA1` results in `signature_method_rejected`` error.
432+
# See https://github.com/pycontribs/jira/pull/1664
433+
oauth_dict["signature_method"] = oauthlib.oauth1.SIGNATURE_RSA
428434

429435
return oauth_dict
430436

etc/requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
Click
33
GitPython
44
PyGithub
5-
jira
5+
# Pin `jira` to apply fix of https://github.com/pycontribs/jira/commit/010223289eb66663aaafb70447397038efb2d40d.
6+
# This avoids the `signature_method_rejected` error described in https://github.com/pycontribs/jira/pull/1643.
7+
# TODO: replace the following line with `jira` once there is a release of `jira` containing the fix.
8+
git+https://github.com/pycontribs/jira.git@010223289eb66663aaafb70447397038efb2d40d
69
cryptography

0 commit comments

Comments
 (0)