File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 47
47
from git import Repo # pip install GitPython
48
48
from github import Github # pip install PyGithub
49
49
from jira import JIRA # pip install jira
50
+ import oauthlib .oauth1
50
51
51
52
if sys .version_info < (3 , 0 , 0 ):
52
53
raise RuntimeError ("This script requires Python 3 or higher" )
@@ -425,6 +426,11 @@ def read_jira_oauth_creds(jira_creds_file):
425
426
oauth_dict ['consumer_key' ] = creds_match .group (3 )
426
427
# Fix the double-backslash created by the decode() call above
427
428
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
428
434
429
435
return oauth_dict
430
436
Original file line number Diff line number Diff line change 2
2
Click
3
3
GitPython
4
4
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
6
9
cryptography
You can’t perform that action at this time.
0 commit comments