theupdateframework / theupdateframework/python-tuf
RFE: expose delegated metadata to client application
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 304
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 17
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、ngclient の既存の get_targetinfo() フローとリンクされた設計ドキュメントを読み、特に Metadata role as search index proposal を確認します。委譲されたメタデータがどのように検索されるかを追跡し、一致しないターゲットパスと終了しない委譲について期待される動作を判断します。クライアントが該当する Targets オブジェクトを公開でき、合意したエッジケースをカバーできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- security
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 32/100