-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Jira: add SSL client certificate support for authentication #9753
Jira: add SSL client certificate support for authentication #9753
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Please remember to add a changelog fragment. Thanks.
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
@weristdominik this PR contains the following merge commits: Please rebase your branch to remove these commits. |
client_cert: | ||
type: path | ||
description: | ||
- Client certificate if required. | ||
- In addition to O(username) and O(password) or O(token). Not mutually exclusive. | ||
version_added: 10.4.0 | ||
client_key: | ||
type: path | ||
description: | ||
- Client certificate key if required. | ||
- In addition to O(username) and O(password) or O(token). Not mutually exclusive. | ||
version_added: 10.4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something that will not be solved now, let alone in this PR, is that the docs for these parameters should be in a doc_fragment, ansible-core has one for url
s but that one includes a parameter .... url
. I don't think ansible-core will be changing that anytime soon (in theory it should break that in two separate fragments, one for the url
itself and another for all these other operational parameters for HTTP transactions, but that would imply changes in a lot modules - not gonna happen).
So, it could/should be a future PR for c.g. to create doc fragments like that and use it within the collection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Backport to stable-10: 💚 backport PR created✅ Backport PR branch: Backported as #9763 🤖 @patchback |
* jira: add ssl client certificate support for authentification * fix code bugs from first CI run * fix fstring not compatible with older python and chhange urlopen module call * removed duplicated post,put,get method * fix urllib module detection Python2/ Python3 * edit HTTP Request back to fetch_url * add changelog fragment * fix python line spacing * Update plugins/modules/jira.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/modules/jira.py Co-authored-by: Felix Fontein <[email protected]> * edit documentation certificate auth not mutually exclusive * Update changelogs/fragments/9753-jira-add-client-certificate-auth.yml Co-authored-by: Felix Fontein <[email protected]> * edit documentation for client certificate auth and token * add no_log for client_cert and client_key * removed no_log for client_cert and client_key --------- Co-authored-by: domin <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit fa7876b)
@weristdominik thanks for your contribution! |
…ate support for authentication (#9763) Jira: add SSL client certificate support for authentication (#9753) * jira: add ssl client certificate support for authentification * fix code bugs from first CI run * fix fstring not compatible with older python and chhange urlopen module call * removed duplicated post,put,get method * fix urllib module detection Python2/ Python3 * edit HTTP Request back to fetch_url * add changelog fragment * fix python line spacing * Update plugins/modules/jira.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/modules/jira.py Co-authored-by: Felix Fontein <[email protected]> * edit documentation certificate auth not mutually exclusive * Update changelogs/fragments/9753-jira-add-client-certificate-auth.yml Co-authored-by: Felix Fontein <[email protected]> * edit documentation for client certificate auth and token * add no_log for client_cert and client_key * removed no_log for client_cert and client_key --------- Co-authored-by: domin <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit fa7876b) Co-authored-by: Dominik <[email protected]>
SUMMARY
Enabled support for Client Certificate authentification for community.general.jira module, for all usecases (creating issue, comment etc.)
Edit
def request()
function and replacedfetch_url()
with usage ofurllib.request
. Allowing both Username+Password (or token) AND Username+Password (or token) + Client Certificate/ Client Key.Can be used by simply adding 2x more values into each Ansible task:
client_cert: "/path/to/client.crt"
client_key: "/path/to/client.key"
Edit DOCUMENTATION & EXAMPLES section inside jira.py File.
ISSUE TYPE
COMPONENT NAME
jira
ADDITIONAL INFORMATION