possible blog post: Caching TUF metadata
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Documentation
- Clarté
- À clarifier
- Activité
- À l'abandon
- Domaine
- content, documentation
Piste de recherche
Aucun fichier, test ou point d’entrée du code n’est indiqué. Commencez par examiner le brouillon fourni et le processus du dépôt pour les contributions au blog ou à la documentation, puis déterminez s’il doit devenir un article publié et quel format ou quelle relecture est requis. Le travail est terminé lorsqu’un article approuvé, relu et prêt à être publié est disponible, ou lorsqu’une décision documentée de ne pas poursuivre a été prise.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
I've spent far too long in the past week looking at CDN logs... I collected some notes from this, and wrote a first draft of a blog post or something. copy-pasting here so I don't lose it
TUF implementation details: Caching and content delivery networks
TUF metadata can be cached at various places during its lifetime, this post aims to describe the useful
methods of caching. The write-up assumes that the "consistent snapshot" feature of TUF is used:
this should be true for all reasonable implementations.
Client metadata cache
A TUF client stores downloaded metadata in an application cache as part of the
TUF Client Workflow. Note that caching metadata is subtly different from caching
artifacts: An artifact cache is a "pure" cache and can be purged at any time without
side-effects (other than possibly having to re-download). Purging the metadata cache
is also possible without service loss but does have minor security implications as
some rollback attack protection is lost.
Client HTTP cache
In addition to the actual metadata, a client could cache the ETag information
included in a timestamp.json response and use the If-None-Match header in
subsequent requests. This is not useful for other metadata or artifacts as they
should never change.
There is a minor information leak if this is done (as the server could now respond
maliciously to only some clients based on the content of the If-None-Match
header). Current client implementations are not known to cache ETag.
Content Delivery Network caching
One could imagine that caching something as simple as TUF metadata in a Content
Delivery Network (CDN) is a trivial feat but it turns out there are several pitfalls.
These are some of the lessons that have been learned while maintaining TUF repositories:
- Uploading a new repository version to backend storage should be atomic (the metadata
versions on the storage backend should always be consistent). If this is not technically possible,
snapshot and all targets metadata should be uploaded before root and timestamp: this
minimizes the window of potentially inconsistent metadata. - "Old" metadata (or artifact) versions should not be removed from backend storage immediately: this can break clients that are in the middle of an update process
- CDN frontends should avoid serving any stale responses: 404 responses to root requests are part of the normal usage of the API and cannot be allowed to be stale, otherwise the repository state may be inconsistent.
- CDN frontends may cache versioned positive metadata responses (root, snapshot, targets) with
long lifetimes. - There are two valid alternatives to caching other responses:
- CDN frontend may use "negative cache" (caching failure codes) and may cache
timestamp metadata responses, if it is able to invalidate the cache immediately on
upload of new repository versions to storage backend. - CDN frontend should not cache timestamp metadata responses or use "negative caching"
if it is unable to invalidate the cache on upload of new data
- CDN frontend may use "negative cache" (caching failure codes) and may cache
At first glance it may seem like the above advice is overly cautious, and that failures
would be rare. In practice especially testing and alerting systems have managed to
consistently find failing combinations of mistakenly cached content.
- Langage dominant
- Python
- Étoiles
- 1.7k
- Forks
- 304
- Merge moyen
- 1 j 2 h
- PR mergées (30 j)
- 17
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de theupdateframework/python-tuf
-
switch to main branch?Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
theupdateframework/python-tuf#3001 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
theupdateframework/python-tuf#2979 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Use Immutable ReleasesOuverteenhancement github_actions
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
theupdateframework/python-tuf#2920 · 1 commentaire · 2 réactions ·
Les mainteneurs répondent en général sous 2 jours
-
Investigate/test fetcher retriesOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
theupdateframework/python-tuf#2842 · 3 commentaires ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
theupdateframework/python-tuf#2836 · 7 commentaires ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de theupdateframework/python-tuf
Issues similaires
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
kristofdegrave/homeassistant-smart-charging#1413 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
nasa/earthdata-varinfo#113 ·
-
curriculum documentation quality
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
githubnext/gh-aw-workshop#3849 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour