pulp / pulp/pulpcore

Create a base `SigningService` class

Open
#3,952 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

Is your feature request related to a problem? Please describe.
Add a layer of abstraction for signing services by making the existing models inherit from a base signing service class.
The current SigningService class is pretty specific to GPG and it is not possible to inherit from it to create other types of signing services such as for Sigstore (see the proposed implementation here, where having a field for a signing script and public key/fingerprint does not make sense).

Describe the solution you'd like

  • Create an abstract BaseSigningService class and make existing signing service models (SigningService, etc) inherit from it. This class can be as minimal as possible, for example with a single name field and an abstract asynchronous sign method.
  • Rename SigningService to GPGSigningService or something equivalent for clarity

Describe alternatives you've considered
Leave the implementation as it is and make new types of signing services inherit from BaseModel directly.

Additional context
@rochacbruno @newswangerd I am unsure if the BaseSigningService class should be abstract or not here. Obviously it is not meant to be implemented directly so it seems more logical to make it an abstract class, but in this case it will not be present in the database, which might be an issue considering our last discussion (would we be able to group all types of signing services in the same place on sign endpoints?)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pulpcore/app/models/content.py at the existing SigningService definition, then review the proposed pulp_ansible implementation linked in the issue. Trace the existing signing service models and sign endpoints to determine how a shared base should be represented and whether it needs database presence. Done means existing GPG behavior remains supported while another signing-service type can use the abstraction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.