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

Provide basic gpg public key management #3024

Open
mdellweg opened this issue Jul 28, 2022 · 2 comments · May be fixed by #5133
Open

Provide basic gpg public key management #3024

mdellweg opened this issue Jul 28, 2022 · 2 comments · May be fixed by #5133
Assignees
Labels

Comments

@mdellweg
Copy link
Member

mdellweg commented Jul 28, 2022

Is your feature request related to a problem? Please describe.
Pulp needs to handle public keys in some places. They are used for verifying uploaded or synced artifacts, and they may be exposed as part of a publication.

Describe the solution you'd like

  • Public GPG keys can be added as a pulp content (either with an artifact, or with the ascii-armored data in a text field - up for discussion). In case data will be stored in a text field we'd need to write a separate handler to serve the pub keys.
  • There can be a GPG-keyring repository type able to hold those keys.
  • Repositories and Remotes that verify artifacts can add a foreign key to these GPG repositories and assume all the keys there are trusted for verification.
  • Signing services can relate directly to the key and should prevent orphan cleanup from deleting the corresponding key, i.e orphan-clean up logic should be adjusted to look not only at repository_membership but also whether there are signing services that point to the key.
  • It should be possible to import/export key repositories as well as they should be covered by RBAC.
  • Keys should be identifiable by their fingerprint and probably stripped off their signatures (maybe store them as a separate content).
  • A publication of the keyring repository should produce a keyring file (*.bkx) as a published artifact.

Describe alternatives you've considered
We discussed whether keys should be content or a standalone generic model. But the benefits from handling keys as content is overwhelming.

Additional context
This is not about private keys. Pulp will never set out to handle anything as sensitive as a private key. For signing we introduced the signing service already to handle all cases including the ones where you never get hold of the key itself.

@bmbouter
Copy link
Member

The upside of having them be content is that they can be associated with repositories themselves if that is what plugin writers want. Also you get import/export and RBAC at low-cost then too.

The big benefit I see for this is the deduplication of the keys. Users wouldn't have to keep providing them over and over, and then if they ever change (rotation, perhaps?) you can update 1 object instead of N.

Overall (and without more details) this is all sounding good.

@ipanova
Copy link
Member

ipanova commented Aug 15, 2022

@rochacbruno PTAL when you have time.

@mdellweg mdellweg self-assigned this Oct 2, 2023
mdellweg added a commit to mdellweg/pulpcore that referenced this issue Mar 14, 2024
This adds a repository type as a keyring and content types to handle
keys, keyids and key signatures.

fixes pulp#3024
@mdellweg mdellweg linked a pull request Mar 14, 2024 that will close this issue
mdellweg added a commit to mdellweg/pulpcore that referenced this issue Mar 14, 2024
This adds a repository type as a keyring and content types to handle
keys, keyids and key signatures.

fixes pulp#3024
mdellweg added a commit to mdellweg/pulpcore that referenced this issue Mar 14, 2024
This adds a repository type as a keyring and content types to handle
keys, keyids and key signatures.

fixes pulp#3024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs review
Development

Successfully merging a pull request may close this issue.

4 participants