RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1452617 - Unable to create IPA Sub CA
Summary: Unable to create IPA Sub CA
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pki-core
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Fraser Tweedale
QA Contact: Abhijeet Kasurde
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-19 10:48 UTC by Abhijeet Kasurde
Modified: 2020-10-04 21:30 UTC (History)
7 users (show)

Fixed In Version: pki-core-10.4.1-7.el7
Doc Type: No Doc Update
Doc Text:
(Fixed a regression only introduced in 10.4 and found by QE)
Clone Of:
Environment:
Last Closed: 2017-08-01 22:52:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
console.log (6.02 KB, text/plain)
2017-06-02 06:47 UTC, Abhijeet Kasurde
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github dogtagpki pki issues 2831 0 None None None 2020-10-04 21:30:53 UTC
Red Hat Product Errata RHBA-2017:2110 0 normal SHIPPED_LIVE pki-core bug fix and enhancement update 2017-08-01 19:36:59 UTC

Description Abhijeet Kasurde 2017-05-19 10:48:56 UTC
Description of problem:
When administrator tries to create subca using `ipa ca-add` it fails with following error :

[root@ipaserver01 ~]# ipa -v ca-add test_1
ipa: INFO: trying https://ipaserver01.testrelm.test/ipa/json
Subject DN: CN=as
ipa: INFO: Forwarding 'ca_add/1' to json server 'https://ipaserver01.testrelm.test/ipa/json'
ipa: ERROR: No valid Negotiate header in server response
[root@ipaserver01 ~]# ipa -vvvv ca-add test_1
ipa: INFO: trying https://ipaserver01.testrelm.test/ipa/json
Subject DN: cn=as
ipa: INFO: Forwarding 'ca_add/1' to json server 'https://ipaserver01.testrelm.test/ipa/json'
ipa: INFO: Request: {
    "id": 0,
    "method": "ca_add/1",
    "params": [
        [
            "test_1"
        ],
        {
            "ipacasubjectdn": "cn=as",
            "version": "2.224"
        }
    ]
}
send: u'POST /ipa/json HTTP/1.1\r\nHost: ipaserver01.testrelm.test\r\nAccept-Encoding: gzip\r\nAccept-Language: en-us\r\nReferer: https://ipaserver01.testrelm.test/ipa/xml\r\nAuthorization: negotiate YIICagYJKoZIhvcSAQICAQBuggJZMIICVaADAgEFoQMCAQ6iBwMFACAAAACjggFrYYIBZzCCAWOgAwIBBaEPGw1URVNUUkVMTS5URVNUojEwL6ADAgEDoSgwJhsESFRUUBseYmtyLWh2MDMtZ3Vlc3QyNy50ZXN0cmVsbS50ZXN0o4IBFjCCARKgAwIBEqEDAgECooIBBASCAQBoJcM0yhbcpf+o6EmhHCFfAdWkBfqGsYPvUE3+jneXRY63dX7bB+/aNY54aPFByuUn7SkdBu27Gsge97e5E9M0D6GI0UM43hXrgk2R+1NcDfZ3slhTMP1FUd/s8P498goEbeVFH57tfrNsV7qhs7lQXTQj4p8MoTEXVUcedWpteYb34hRF06vvlGmFi4iyzOk5uBfs0NTfn4BHrx2l51P2nf4AifslGjcXbNLOXZrH8g0ERMnbAb9QLML3nH22tVBPHmVsPpzNonANouFea5c7F90jqW5mTWsnEOHbjEcK4RGJfGycwz2+OwasSUTzzX5BMPo/p/4chnSoeMBcLoRPpIHQMIHNoAMCARKigcUEgcIKhP1AebEYSltMX06H6YPpoqMEl92AQaFT+RzAFEoQTxiQFBGlPFZy00pX8gx8M+FbEB40TDrjs7gkxK2xoi/zA3uquHb0HYG+GCtLZU6hXVL2yyyPXXojcUx86iCNHKl8/olrFgQujz6JJwFQu8VhnU7rky4Q1mY0EWRuxCNU6iqb9fGQZMqRB4d7njcYnPAAzsYMXLPDPvl0wISHTVQ88GYqT58XxcZqycYNJAvLar7mXYPen7LIzEkOyRkhP0s8MA==\r\nUser-Agent: xmlrpclib.py/1.0.1 (by www.pythonware.com)\r\nContent-Type: application/json\r\nContent-Length: 200\r\n\r\n{\n    "id": 0, \n    "method": "ca_add/1", \n    "params": [\n        [\n            "test_1"\n        ], \n        {\n            "ipacasubjectdn": "cn=as", \n            "version": "2.224"\n        }\n    ]\n}'
reply: 'HTTP/1.1 401 Unauthorized\r\n'
header: Date: Fri, 19 May 2017 10:27:34 GMT
header: Server: Apache/2.4.6 (Red Hat Enterprise Linux) mod_auth_gssapi/1.5.1 mod_nss/1.0.14 NSS/3.28.4 mod_wsgi/3.4 Python/2.7.5
header: WWW-Authenticate: Negotiate
header: Set-Cookie: ipa_session=expiry=1495191454389356;Max-Age=1800;path=/ipa;httponly;secure;
header: X-Frame-Options: DENY
header: Content-Security-Policy: frame-ancestors 'none'
header: Last-Modified: Thu, 18 May 2017 14:35:14 GMT
header: Accept-Ranges: bytes
header: Content-Length: 1474
header: Cache-Control: no-cache
header: Content-Type: text/html; charset=UTF-8
ipa: ERROR: No valid Negotiate header in server response
[root@ipaserver01 ~]# echo $?
1
[root@ipaserver01 ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28

Version-Release number of selected component (if applicable):
[root@ipaserver01 ~]# rpm -qa ipa-server
ipa-server-4.5.0-13.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install IPA server
2. Create Sub CA using ipa

Actual results:
Error as mentioned above

Expected results:
Sub CA created successfully.

Comment 3 Petr Vobornik 2017-05-19 11:04:23 UTC
ipa: ERROR: No valid Negotiate header in server response

is not an error related to Sub CA but more for session handling and authentication. So in theory on this machine every ipa CLI command should give you this error.

Does:
  systemctl restart gssproxy.service
  systemctl restart httpd.service

help?

If so. Is it really just after clean ipa install? Isn't there update step or something?

Ideally a beaker job if it is available.

Comment 4 Abhijeet Kasurde 2017-05-19 12:30:13 UTC
(In reply to Petr Vobornik from comment #3)
> ipa: ERROR: No valid Negotiate header in server response
> 
> is not an error related to Sub CA but more for session handling and
> authentication. So in theory on this machine every ipa CLI command should
> give you this error.
> 
> Does:
>   systemctl restart gssproxy.service
>   systemctl restart httpd.service
> 
> help?
> 
After restarting error disappeared, but now there is new error 

[root@ipaserver01 ~]# echo Secret123 | kinit admin
Password for admin:
[root@ipaserver01 ~]# ipa ca-add
Name: SampleCA
Subject DN: CN=SampleCA,DN=testrelm.test
ipa: ERROR: Request failed with status 400: Non-2xx response from CA REST API: 400. java.lang.IllegalArgumentException: Invalid Subject DN: CN=SampleCA,DN=testrelm.test
[root@ipaserver01 ~]# ipactl status
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
httpd Service: RUNNING
ipa-custodia Service: RUNNING
ntpd Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa-dnskeysyncd Service: RUNNING
ipa: INFO: The ipactl command was successful

> If so. Is it really just after clean ipa install? Isn't there update step or
> something?
> 
IPA server installation is clean installation. There is no update or upgrade.

> Ideally a beaker job if it is available.
Here is link of CI job - 
https://platform-stg-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/ipa-rhel-7.4-candidate-runtest-subca-pytest/21/testReport/

Comment 5 Fraser Tweedale 2017-05-22 03:33:51 UTC
The Subject DN "CN=SampleCA,DN=testrelm.test" is invalid
(there is no "DN" attribute).  So there is not really a bug;
but we should detect and handle this error gracefully.

Comment 6 Abhijeet Kasurde 2017-05-22 05:44:45 UTC
(In reply to Fraser Tweedale from comment #5)
> The Subject DN "CN=SampleCA,DN=testrelm.test" is invalid
> (there is no "DN" attribute).  So there is not really a bug;
> but we should detect and handle this error gracefully.
Yes, I agree Subject DN is not valid. But, command still fails with correct Subject DN.

# ipa ca-add
Name: SampleCA1
Subject DN: CN=SampleCA1,O=testrelm.test
ipa: ERROR: Request failed with status 500: Non-2xx response from CA REST API: 500. Error creating CA: Error creating lightweight CA certificate: java.lang.NullPointerException

Comment 7 Fraser Tweedale 2017-05-22 07:16:49 UTC
Huh.  Can you provide a traceback, Abhijeet?

Comment 9 Fraser Tweedale 2017-05-26 07:46:42 UTC
Confirmed.  It is regression in Dogtag.  Patch imminent.

Comment 10 Fraser Tweedale 2017-05-26 07:59:31 UTC
Upstream patch committed (2866f6195eb49012cf7c42089a9fbf1be819129a).

Comment 13 Abhijeet Kasurde 2017-06-02 06:47:13 UTC
Verified using IPA and PKI Server version::
ipa-server-4.5.0-14.el7.x86_64
pki-server-10.4.1-7.el7.noarch

Marking BZ as verified. See attachments for console.log.

Comment 14 Abhijeet Kasurde 2017-06-02 06:47:58 UTC
Created attachment 1284331 [details]
console.log

Comment 15 errata-xmlrpc 2017-08-01 22:52:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2110


Note You need to log in before you can comment on or make changes to this bug.