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

Closed
mdellweg opened this issue Jul 28, 2022 · 5 comments · Fixed by #5133
Closed

Provide basic gpg public key management #3024

mdellweg opened this issue Jul 28, 2022 · 5 comments · 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
@pulpbot pulpbot moved this to In Progress in RH Pulp Kanban board 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
@pulpbot pulpbot moved this from In Progress to Needs review in RH Pulp Kanban board Mar 14, 2024
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
@pedro-psb
Copy link
Member

(just connecting the dots, because I was reading this comment).
This feature request should benefit from the proposal here.

mdellweg added a commit to mdellweg/pulpcore that referenced this issue Sep 26, 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 Sep 26, 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 Oct 2, 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 Oct 2, 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 Oct 9, 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 Oct 9, 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 Oct 11, 2024
This adds a repository type as a keyring and content types to handle
keys, keyids and key signatures.

fixes pulp#3024
@netsandbox
Copy link

@mdellweg where can I find the documentation for this new feature?

@mdellweg
Copy link
Member Author

There is none yet. Also work is meant as an enabler for other ideas.
What is currently possible:
Create and distribute a "keyring" repository. Upload public keys into it. Download them through the distribution again. Reupload the same keys with additional signatures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Needs review
Development

Successfully merging a pull request may close this issue.

6 participants