Project

Profile

Help

Story #8192

Task #8732: [EPIC] As a user, I can rest easy with all sensitive credentials in the database encrypted at rest

Add code to pulpcore that uses the db key to encrypt fields

Added by bmbouter 9 months ago. Updated about 2 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
GalaxyNG
Sprint:
Sprint 102
Quarter:
Q2-2021

Description

Motivation

Pulp stores sensitive credentials, e.g. password for Basic Auth, proxy password, or client key for client certificate based authentication in the database in plaintext. The authentication and authorization mechanisms of Pulp keep these safe, but if the database itself was compromised, or dumped, those secrets would be readable to anyone with a copy.

Proposal

Encrypt these credentials when they live in the database and decrypt them when they are used. This encryption would use symmetric encryption with a key stored on the filesystem that is generated at install time. A good option would be Fernet symmetric key encryption from the cryptography library.

Related to Story on Removing Secrets from API Response

The scope of the fields that are encrypted should be the same as those that are no longer returned in the API due to sensitivity. See Story 8202 for the list of fields.

Installation Details

The private key will need to be generated at install time. We need to determine where to keep these by default securely. They need to be readable by code without a human involved.


Related issues

Blocked by Pulp - Task #8202: Make sensitive fields write_only and stop filtering on themCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 38799519 View on GitHub
Added by daviddavis 2 months ago

Encrypt Remote fields in the database

fixes #8192

History

#1 Updated by bmbouter 9 months ago

  • Sprint/Milestone set to 3.12.0

#2 Updated by bmbouter 9 months ago

  • Description updated (diff)

#3 Updated by bmbouter 9 months ago

  • Blocked by Task #8202: Make sensitive fields write_only and stop filtering on them added

#4 Updated by bmbouter 8 months ago

  • Tags Katello added

#5 Updated by bmbouter 8 months ago

  • Tags GalaxyNG added
  • Tags deleted (Katello)

#6 Updated by mdellweg 7 months ago

  • Sprint/Milestone changed from 3.12.0 to 3.13.0

#7 Updated by daviddavis 6 months ago

  • Quarter set to Q2-2021

#8 Updated by daviddavis 6 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis
  • Sprint set to Sprint 95

#9 Updated by rchan 6 months ago

  • Sprint changed from Sprint 95 to Sprint 96

#10 Updated by pulpbot 6 months ago

  • Status changed from ASSIGNED to POST

#11 Updated by daviddavis 6 months ago

  • Blocked by Task #8704: Installer: create a key for pulp to use when encrypting sensitive db fields added

#12 Updated by daviddavis 6 months ago

  • Sprint/Milestone deleted (3.13.0)

Hoping to still get this into 3.13 but it doesn't need to block 3.13. Confirmed with Ansible they don't need it until their next release.

#13 Updated by daviddavis 5 months ago

  • Blocked by deleted (Task #8704: Installer: create a key for pulp to use when encrypting sensitive db fields)

#14 Updated by daviddavis 5 months ago

  • Subject changed from As a user, I can rest easy with all sensitive credentials in the database encrypted at rest to [EPIC] As a user, I can rest easy with all sensitive credentials in the database encrypted at rest

#15 Updated by daviddavis 5 months ago

  • Status changed from POST to NEW
  • Assignee deleted (daviddavis)

#16 Updated by rchan 5 months ago

  • Sprint changed from Sprint 96 to Sprint 97

#17 Updated by rchan 5 months ago

  • Sprint changed from Sprint 97 to Sprint 98

#18 Updated by mdepaulo@redhat.com 5 months ago

The filepath will be: /etc/pulp/certs/database_fields.symmetric.key as the default path or fixed path for installer / container / operator.

We agreed (at a pulp_installer meeting I think) that the pulp certs directory would be used, since private keys for certs are kept under there, and it needs similar permissions.

We didn't agree on a filename, but we were thinking of ending with .symmetric.key ( .key is the suffix for private keys for certs.)

#19 Updated by rchan 4 months ago

  • Sprint changed from Sprint 98 to Sprint 99

#20 Updated by daviddavis 4 months ago

  • Sprint/Milestone set to 3.15.0

#21 Updated by rchan 4 months ago

  • Sprint changed from Sprint 99 to Sprint 100

#22 Updated by rchan 3 months ago

  • Sprint changed from Sprint 100 to Sprint 101

#23 Updated by ipanova@redhat.com 3 months ago

  • Sprint changed from Sprint 101 to Sprint 102

#24 Updated by daviddavis 2 months ago

  • Status changed from NEW to MODIFIED
  • % Done changed from 80 to 100

#25 Updated by daviddavis 2 months ago

  • Parent task set to #8732

#26 Updated by daviddavis 2 months ago

  • Subject changed from [EPIC] As a user, I can rest easy with all sensitive credentials in the database encrypted at rest to Add code to pulpcore that uses the db key to encrypt fields

#27 Updated by pulpbot about 2 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF