Bug 1541853

Summary: ProfileService: config values with backslashes have backslashes removed
Product: Red Hat Enterprise Linux 7 Reporter: Fraser Tweedale <ftweedal>
Component: pki-coreAssignee: Fraser Tweedale <ftweedal>
Status: CLOSED ERRATA QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: unspecified    
Version: 7.4CC: akahat, enewland, ftweedal, j.becker, mharmsen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: pki-core-10.5.1-7.el7 Doc Type: Bug Fix
Doc Text:
The Certificate System profile configuration update method now correctly handles backslashes Previously, a parser in Certificate System removed backslash characters from the configuration when a user updated a profile. As a consequence, affected profile configurations could not be correctly imported, and issuing certificates failed or the system issued incorrect certificates. Certificate System now uses a parser that handles backslashes correctly. As a result, profile configuration updates import the configuration correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 17:04:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Fraser Tweedale 2018-02-05 04:49:12 UTC
Description of problem:

When writing (importing, updating) RAW profile data, config values that have backslashes in them have the backslashes dropped, leading to issuance failures or issuance of incorrect certificates. For example:

    policyset.serverCertSet.1.default.params.name=CN=$request.req_subject_name.cn$, O=Red Hat\, Inc.


    policyset.serverCertSet.1.default.params.name=CN=$request.req_subject_name.cn$, O=Red Hat, Inc.

which causes issuance failures due to parse failure of the resulting DN.

How reproducible: always

Steps to Reproduce:
1. create profile config with SubjectNameDefault configuration with escaped comma (see example above).
   the /raw method must be used
2. attempt to issue a certificate using that profile

Actual results:

Certificate issuance fails because the backslash got removed upon profile
configuration import, resulting in an unparsable DN.

Expected results:

Backslash does not get clobbered on profile import, and certificate issuance

Comment 2 Fraser Tweedale 2018-02-05 05:13:06 UTC
Pushed to upstream master: e634316eb7f2aedc65fe528fb572b15e1bdc1eb2

Comment 3 Matthew Harmsen 2018-02-05 19:04:57 UTC

The PKI Team is working on obtaining Common Criteria certification for the RHCS layered product.  Several of the components that comprise this release are now located within RHEL 7.  As such, the following bug has been identified as a worthy candidate for inclusion for this release, and so we are requesting an exception flag ACK so that we may attempt to include this bug within the snapshot phases.

Comment 5 Amol K 2018-02-12 09:24:01 UTC
I tested this Bugzilla on a 10.5.1-7.el7 version.

Steps which I followed to verify the Bugzilla:

- Get profile caServerCert in raw format.

- Change the Id of the profile. Modify the attribute  `default.params.name` to `CN\=$request.req_subject_name.cn$,O\=Red Hat\, Inc.`

- Add the profile to the CA and Enable it.

- Show the profile in raw format. Make sure that `default.params.name` attribute value does not contain the backslash.

- Issued the certificate using the profile, and it is successful.

Verifying this bug.

Comment 6 Fraser Tweedale 2018-02-22 09:07:00 UTC
*** Bug 1346433 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2018-04-10 17:04:05 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.