Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: ssl fields on remote are hard to use #99

Merged
merged 1 commit into from Apr 26, 2019
Merged

Conversation

dkliban
Copy link
Member

@dkliban dkliban commented Apr 24, 2019

Solution: switch all ssl fields to TextField

This patch switches the storage of SSL certs, keys, and CAs from filesystem to
database. This patch also introduces a new serializer field that returns a SHA256
digest for GET operations.

Required PR: pulp/pulpcore-plugin#91

Fixes: #4506
https://pulp.plan.io/issues/4506

Re: #4676
https://pulp.plan.io/issues/4676

@dkliban dkliban force-pushed the ssl-fields branch 3 times, most recently from c9e004b to fc80217 Compare Apr 24, 2019
@codecov
Copy link

@codecov codecov bot commented Apr 24, 2019

Codecov Report

Merging #99 into master will increase coverage by 0.01%.
The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #99      +/-   ##
=========================================
+ Coverage   67.79%   67.8%   +0.01%     
=========================================
  Files          65      65              
  Lines        3018    3019       +1     
=========================================
+ Hits         2046    2047       +1     
  Misses        972     972
Impacted Files Coverage Δ
pulpcore/app/serializers/__init__.py 100% <ø> (ø) ⬆️
pulpcore/app/serializers/repository.py 98.97% <100%> (ø) ⬆️
pulpcore/app/models/repository.py 64.51% <100%> (-0.04%) ⬇️
pulpcore/app/serializers/fields.py 67.53% <75%> (+0.4%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31bda7b...0fea20f. Read the comment docs.

Solution: switch all ssl fields to TextField

This patch switches the storage of SSL certs, keys, and CAs from filesystem to
database. This patch also introduces a new serializer field that returns a SHA256
digest for GET operations.

Required PR: pulp/pulpcore-plugin#91

fixes: #4506
https://pulp.plan.io/issues/4506

re: #4676
https://pulp.plan.io/issues/4676
@@ -1,5 +1,6 @@
from gettext import gettext as _
import os
import hashlib
Copy link
Member

@bmbouter bmbouter Apr 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alphebatize this please.

@@ -209,3 +210,14 @@ def to_representation(self, value):
prefix.strip('/'),
base_path.lstrip('/')
))


class SecretCharField(serializers.CharField):
Copy link
Member

@bmbouter bmbouter Apr 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@bmbouter bmbouter left a comment

This is a great improvement! Thank you @dkliban 👍

@dkliban dkliban merged commit 4ad7ddf into pulp:master Apr 26, 2019
3 checks passed
@dkliban dkliban deleted the ssl-fields branch Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants