#2606 Dogtag's Python client does not validate certificate
Closed: fixed 3 years ago by edewata. Opened 7 years ago by mharmsen.

Dogtag's pki.client.PKIConnection class disables python-requests certificate
validation [1]. The argument verify=False means that no certificate
validation is performed at all [2]. The client accepts any certificate. Since
the verify parameter is hard-coded in all request functions, it is not possible
to override the setting.

PKIConnection should use requests default settings (verify with default certs)
and offer an API to override default CA certs or disable requests.

[1] https://github.com/dogtagpki/pki/blob/master/base/common/python/pki/client.
py#L146
[2] https://requests.readthedocs.io/en/master/user/advanced/#ssl-cert-verification

Steps to Reproduce:

from pki.client import PKIConnection
conn = PKIConnection(protocol='https',
hostname='untrusted-root.badssl.com', port='443', subsystem='')
conn.get('')
<Response [200]>

Actual Results:

Request OK

Expected Results:

TLS/SSL exception


Metadata Update from @mharmsen:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1426572

7 years ago

Metadata Update from @mharmsen:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1426572

7 years ago

Metadata Update from @mharmsen:
- Custom field component adjusted to General
- Custom field feature adjusted to ''
- Custom field origin adjusted to Community
- Custom field proposedmilestone adjusted to ''
- Custom field proposedpriority adjusted to ''
- Custom field reviewer adjusted to ''
- Custom field type adjusted to defect
- Custom field version adjusted to ''
- Issue priority set to: 3
- Issue set to the milestone: 10.4 (was: 0.0 NEEDS_TRIAGE)

7 years ago

Per CS/DS Meeting of August 7, 2017, it was determined to move this issue from 10.4 ==> FUTURE.

Metadata Update from @mharmsen:
- Issue set to the milestone: FUTURE (was: 10.4)

6 years ago

Metadata Update from @mharmsen:
- Issue priority set to: critical (was: major)
- Issue set to the milestone: 10.5 (was: FUTURE)

6 years ago

Metadata Update from @mharmsen:
- Issue priority set to: major (was: critical)

6 years ago

[20171025] - Offline Triage ==> 10.6

Metadata Update from @mharmsen:
- Issue set to the milestone: 10.6 (was: 10.5)

6 years ago

Per 10.5.x/10.6 Triage: 10.6

alee: should be fixed

Metadata Update from @edewata:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/2726

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Login to comment on this ticket.

Metadata