Bug 1436334

Summary: WebUI: Adding certificate mapping data using certificate fails
Product: Red Hat Enterprise Linux 7 Reporter: Petr Vobornik <pvoborni>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED ERRATA QA Contact: Scott Poore <spoore>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.4CC: ipa-qe, nsoman, pvoborni, rcritten, spoore, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.5.0-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 09:46:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Vobornik 2017-03-27 16:53:09 UTC
Cloned from upstream: https://pagure.io/freeipa/issue/6772

When pasting certificate in PEM the action fails unless user omits ```-----BEGIN CERTIFICATE-----``` and ```-----END CERTIFICATE-----```. Other fields in WebUI accepts certificates with encapsulation boundaries without problems.

Comment 2 Petr Vobornik 2017-03-27 16:53:25 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/6772

Comment 3 Petr Vobornik 2017-03-27 16:54:55 UTC
ipa-4-5:
    eda23a9847197513555f6237b46c658365dfc12d WebUI: Allow to add certs to certmapping with CERT LINES around
    

master:
    84b38b6793cbc45d36c39abf79893e22e90baac6 WebUI: Allow to add certs to certmapping with CERT LINES around


This fix makes the user experience more consistent with other cert related operations.

Comment 5 Scott Poore 2017-05-02 02:07:40 UTC
Verified.

Version ::

ipa-server-4.5.0-8.el7.x86_64

Results ::

Select demosc3 user
Select "Certificate mapping data" add
Select Certificate add
Paste:

-----BEGIN CERTIFICATE-----
MIIDqzCCApOgAwIBAgIBYjANBgkqhkiG9w0BAQsFADA4MRYwFAYDVQQKDA1URVNU
UkVMTS5URVNUMR4wHAYDVQQDDBV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c1NSjYencYd7gzN32W2jDCUHCqtEavKZ
8IC+cIAkGgkjLgVz4HGtb/xglKvBht3sIJRxeHz8bR26y8ITankNVELTpGhSHDZX
a55RKXwwpjNKuiDfr1QpF+mtqkE5n21cR+nQGPHVyA==
-----END CERTIFICATE-----

Clicked Add at bottom of window

In user listing it now shows for certificate mapping data:

X509:<I>O=TESTRELM.TEST,CN=Certificate Authority<S>O=TESTRELM.TEST,CN=demosc1

Comment 6 errata-xmlrpc 2017-08-01 09:46:16 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:2304