Story #8192
closedTask #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
100%
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
Updated by bmbouter almost 4 years ago
- Blocked by Task #8202: Make sensitive fields write_only and stop filtering on them added
Updated by bmbouter almost 4 years ago
- Tags GalaxyNG added
- Tags deleted (
Katello)
Updated by mdellweg over 3 years ago
- Sprint/Milestone changed from 3.12.0 to 3.13.0
Updated by daviddavis over 3 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
- Sprint set to Sprint 95
Updated by pulpbot over 3 years ago
- Status changed from ASSIGNED to POST
Updated by daviddavis over 3 years ago
- Blocked by Task #8704: Installer: create a key for pulp to use when encrypting sensitive db fields added
Updated by daviddavis over 3 years 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.
Updated by daviddavis over 3 years ago
- Blocked by deleted (Task #8704: Installer: create a key for pulp to use when encrypting sensitive db fields)
Updated by daviddavis over 3 years 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
Updated by daviddavis over 3 years ago
- Status changed from POST to NEW
- Assignee deleted (
daviddavis)
Updated by mdepaulo@redhat.com over 3 years 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.)
Updated by ipanova@redhat.com over 3 years ago
- Sprint changed from Sprint 101 to Sprint 102
Added by daviddavis over 3 years ago
Updated by daviddavis over 3 years ago
- Status changed from NEW to MODIFIED
- % Done changed from 80 to 100
Applied in changeset pulpcore|387995199e19f087e4ee6996128744ee7fc94dd5.
Updated by daviddavis over 3 years 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
Updated by pulpbot about 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Encrypt Remote fields in the database
fixes #8192