theupdateframework / theupdateframework/python-tuf
RFE: expose delegated metadata to client application
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1.7k
- Fork
- 304
- Merge medio
- 1g 2h
- PR unite (30g)
- 17
Descrizione
EDIT: The overall issue is described in detail in https://docs.google.com/document/d/1rWHAM2qCUtnjWD4lOrGWE2EIDLoA7eSy4-jB66Wgh0o . The suggestion here is roughly the Metadata role (file) as search index solution in the document.
Assume a setup like this (this is what we expect a community artifact repository like PyPI to look like if it uses developer signatures with TUF):
- a specific project/product team controls a delegated metadata
- TUF clients want to know details of all of the artifacts in this metadata (to e.g. figure out which versions of an artifact are available)
Currently there is no way for the client application to get the whole metadata content from ngclient. We could provide a call much like get_targetinfo() that instead of the TargetFile would return the Targets object where the target search ended:
def get_targets_metadata(target_path: str) -> Targets
"""returns a Targets object of the metadata where the search for target_path terminated"""
This is not applicable to every TUF repo:
- it requires a "contract" between repository and client: client has to know of a
target_paththat is delegated to the correct metadata -- in the pypi example it could be e.g. the PyPI project name - this is only useful if all "related" target files are listed in the same metadata
But with those assumptions the client can now easily get not just the list of target files it's interested in but also any custom metadata embedded in the targets metadata.
I've not thought through all the cases (what happens if there is no targetpath match? what if there is no terminating delegation?) but I think this is something we could consider implementing
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo il flusso get_targetinfo() esistente di ngclient e il documento di progettazione collegato, in particolare la proposta Metadata role as search index. Traccia il modo in cui vengono cercati i metadati delegati e determina il comportamento previsto per i percorsi target senza corrispondenza e le deleghe non terminanti. Il lavoro è completato quando il client può esporre l’oggetto Targets pertinente e sono coperti i casi limite concordati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- security
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 32/100