Story #8192
closed
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
Status:
CLOSED - CURRENTRELEASE
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.
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.
- Sprint/Milestone set to 3.12.0
- Description updated (diff)
- Blocked by Task #8202: Make sensitive fields write_only and stop filtering on them added
- Tags GalaxyNG added
- Tags deleted (
Katello)
- Sprint/Milestone changed from 3.12.0 to 3.13.0
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
- Sprint set to Sprint 95
- Sprint changed from Sprint 95 to Sprint 96
- Status changed from ASSIGNED to POST
- Blocked by Task #8704: Installer: create a key for pulp to use when encrypting sensitive db fields added
- 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.
- Blocked by deleted (Task #8704: Installer: create a key for pulp to use when encrypting sensitive db fields)
- 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
- Status changed from POST to NEW
- Assignee deleted (
daviddavis)
- Sprint changed from Sprint 96 to Sprint 97
- Sprint changed from Sprint 97 to Sprint 98
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.)
- Sprint changed from Sprint 98 to Sprint 99
- Sprint/Milestone set to 3.15.0
- Sprint changed from Sprint 99 to Sprint 100
- Sprint changed from Sprint 100 to Sprint 101
- Sprint changed from Sprint 101 to Sprint 102
- Status changed from NEW to MODIFIED
- % Done changed from 80 to 100
- Parent issue set to #8732
- 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
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
Encrypt Remote fields in the database
fixes #8192