Create a base `SigningService` class
Nobody has claimed this yet.
- 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
BaseSigningServiceclass and make existing signing service models (SigningService, etc) inherit from it. This class can be as minimal as possible, for example with a singlenamefield and an abstract asynchronous sign method. - Rename
SigningServicetoGPGSigningServiceor 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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