possible blog post: Caching TUF metadata
Mantenedores costumam responder em até 10 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Documentação
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Domínio
- content, documentation
Direção de pesquisa
Nenhum arquivo, teste ou ponto de entrada do código é indicado. Comece revisando o rascunho colado e o processo do repositório para contribuições ao blog ou à documentação; em seguida, esclareça se isso deve se tornar uma publicação e qual formato ou revisão é necessário. Considera-se concluído quando houver um artigo acordado, revisado e pronto para publicação, ou uma decisão documentada de não prosseguir com isso.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 1.7k
- Forks
- 304
- Merge médio
- 9h 25min
- PRs com merge (30d)
- 14
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de theupdateframework/python-tuf
-
switch to main branch?Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
theupdateframework/python-tuf#3001 ·
Mantenedores costumam responder em até 10 dias
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
theupdateframework/python-tuf#2979 · 1 comentário ·
Mantenedores costumam responder em até 10 dias
-
Use Immutable ReleasesAbertaenhancement github_actions
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
theupdateframework/python-tuf#2920 · 1 comentário · 2 reações ·
Mantenedores costumam responder em até 10 dias
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
theupdateframework/python-tuf#2842 · 3 comentários ·
Mantenedores costumam responder em até 10 dias
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
theupdateframework/python-tuf#2836 · 7 comentários ·
Mantenedores costumam responder em até 10 dias
Todas as issues de theupdateframework/python-tuf
Issues semelhantes
-
pydanty:is-working
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
pydantic/pydantic-ai#8843 ·
Mantenedores costumam responder em até 1 dia
-
breaking change enhancement server
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
sktime/sktime#11310 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia