dogtagpki / pki

The Dogtag Certificate System is an enterprise-class Certificate Authority (CA) which supports all aspects of certificate lifecycle management, including key archival, OCSP and smartcard management.
https://www.dogtagpki.org
GNU General Public License v2.0
373 stars 137 forks source link

python-requests 1.2 breaks PKI replica installation #1282

Closed pki-bot closed 4 years ago

pki-bot commented 4 years ago

This issue was migrated from Pagure Issue #713. Originally filed by pviktori (@encukou) on 2013-08-22 13:15:00:


With python-requests-1.2.3-2.fc19.noarch (fedora-updates-testing, https://admin.fedoraproject.org/updates/FEDORA-2013-15065/python-requests-1.2.3-2.fc19), FreeIPA replica installation results in a backtrace from pki-spawn:

2013-08-22T11:09:14Z DEBUG Contents of pkispawn configuration file (/tmp/tmp1UORuZ):
[CA]
pki_security_domain_name = IPA
pki_enable_proxy = True
pki_restart_configured_instance = False
pki_backup_keys = True
pki_backup_password = XXXXXXXX
pki_client_database_dir = /tmp/tmp-ehNpDV
pki_client_database_password = XXXXXXXX
pki_client_database_purge = False
pki_client_pkcs12_password = XXXXXXXX
pki_admin_name = admin
pki_admin_uid = admin
pki_admin_email = root@localhost
pki_admin_password = XXXXXXXX
pki_admin_nickname = ipa-ca-agent
pki_admin_subject_dn = cn=ipa-ca-agent,O=IDM.LAB.ENG.BRQ.REDHAT.COM
pki_client_admin_cert_p12 = /root/ca-agent.p12
pki_ds_ldap_port = 389
pki_ds_password = XXXXXXXX
pki_ds_base_dn = o=ipaca
pki_ds_database = ipaca
pki_subsystem_subject_dn = cn=CA Subsystem,O=IDM.LAB.ENG.BRQ.REDHAT.COM
pki_ocsp_signing_subject_dn = cn=OCSP Subsystem,O=IDM.LAB.ENG.BRQ.REDHAT.COM
pki_ssl_server_subject_dn = cn=vm-172.idm.lab.eng.brq.redhat.com,O=IDM.LAB.ENG.BRQ.REDHAT.COM
pki_audit_signing_subject_dn = cn=CA Audit,O=IDM.LAB.ENG.BRQ.REDHAT.COM
pki_ca_signing_subject_dn = cn=Certificate Authority,O=IDM.LAB.ENG.BRQ.REDHAT.COM
pki_subsystem_nickname = subsystemCert cert-pki-ca
pki_ocsp_signing_nickname = ocspSigningCert cert-pki-ca
pki_ssl_server_nickname = Server-Cert cert-pki-ca
pki_audit_signing_nickname = auditSigningCert cert-pki-ca
pki_ca_signing_nickname = caSigningCert cert-pki-ca
pki_security_domain_hostname = vm-173.idm.lab.eng.brq.redhat.com
pki_security_domain_https_port = 443
pki_security_domain_user = admin
pki_security_domain_password = XXXXXXXX
pki_clone = True
pki_clone_pkcs12_path = /tmp/ca.p12
pki_clone_pkcs12_password = XXXXXXXX
pki_clone_replication_security = TLS
pki_clone_replication_master_port = 389

pki_clone_replication_clone_port = 389
pki_clone_replicate_schema = False
pki_clone_uri = https://vm-173.idm.lab.eng.brq.redhat.com:443

2013-08-22T11:09:14Z DEBUG Starting external process
2013-08-22T11:09:14Z DEBUG args=/usr/sbin/pkispawn -s CA -f /tmp/tmp1UORuZ
2013-08-22T11:09:15Z DEBUG Process finished, return code=1
2013-08-22T11:09:15Z DEBUG stdout=Loading deployment configuration from /tmp/tmp1UORuZ.

2013-08-22T11:09:15Z DEBUG stderr=Traceback (most recent call last):
  File "/usr/sbin/pkispawn", line 429, in <module>
    main(sys.argv)
  File "/usr/sbin/pkispawn", line 351, in main
    info = parser.sd_get_info()
  File "/usr/lib/python2.7/site-packages/pki/deployment/pkiparser.py", line 401, in sd_get_info
    info = sd.getSecurityDomainInfo()
  File "/usr/lib/python2.7/site-packages/pki/system.py", line 37, in getSecurityDomainInfo
    j = r.json()
  File "/usr/lib/python2.7/site-packages/requests/models.py", line 651, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/usr/lib64/python2.7/site-packages/simplejson/__init__.py", line 488, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/site-packages/simplejson/decoder.py", line 374, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib64/python2.7/site-packages/simplejson/decoder.py", line 393, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I'm not sure if it's a Dogtag or Requests bug.

pki-bot commented 4 years ago

Comment from vakwetu (@vakwetu) at 2013-09-05 04:45:47

This appears to be resolved as of python-requests 1.2.3-5. encukou tested and confirmed that we can close this issue.

pki-bot commented 4 years ago

Comment from pviktori (@encukou) at 2017-02-27 13:59:39

Metadata Update from @encukou: