Issue #6735
closedDocs incorrectly recommend to users they escape newlines from their ca_cert and client_cert
Description
Background¶
The BaseRemote.ca_cert and BaseRemote.client_cert fields the current serializers tell the user "All new line characters must be escaped". You can see that here.
There are two issues with this:
-
It's not needed. For example pulp-certguard allows users to submit certs without modification, they are saved in the database, and openssl uses them correctly.
-
It's extra work for users.
Solution¶
- Update the serializers to not have newlines escaped
- Audit the handling of these fields throughout the code and remove any "unescaping" that is done
- Add a
.removal
release note indicating this is a breaking change and users will need to re-save their ca_cert and client_cert fields - Audit client_key as well just for good measure
- Add a test that sync's content where a ca_cert is required
- Add a test that sync's content where a client_cert and client_key is required
How to add these tests?¶
These tests will use the Red Hat CDN and will use a test certificate and key registered to pulp-infra, along with the master ca_cert of the Red Hat CDN. The test certs will be stored as a Travis secret and made available to the tests via environment variables. If the test goes to run and the environment variables are not present the test should skip.
Updated by fao89 over 4 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 73
Updated by lmjachky over 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to lmjachky
Updated by lmjachky over 4 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
lmjachky)
Updated by ppicka over 4 years ago
observations: even unescaped string got escaped by django so to use certificate 'at' notation (http POST :pulp/api/v3/...remote client_cert=@./cdn.crt client_key=@./cdn.key) must be used.
Updated by ppicka over 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ppicka
Updated by pulpbot over 4 years ago
- Status changed from ASSIGNED to POST
Updated by ppicka over 4 years ago
Test will be added to RPM plugin as CDN has an rpm content (https://pulp.plan.io/issues/7134).
Added by ppicka over 4 years ago
Updated by ppicka over 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|f1911e73ca6c3a27b72887f7eb7cb62b78b1d72f.
Added by ppicka over 4 years ago
Revision e7f6ec13 | View on GitHub
Remote certs esacping
User doesn't have to escape newlines for ca_cert, client_cert and client_key fields.
closes: #6735 https://pulp.plan.io/issues/6735 (cherry picked from commit f1911e73ca6c3a27b72887f7eb7cb62b78b1d72f)
Updated by ppicka over 4 years ago
Applied in changeset pulpcore|e7f6ec13511463e5bfc7d9e5de84eb29c1c5bbf8.
Updated by pulpbot over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Remote certs esacping
User doesn't have to escape newlines for ca_cert, client_cert and client_key fields.
closes: #6735 https://pulp.plan.io/issues/6735