Skip to content

Commit

Permalink
ngclient: Increase default max_root_rotations
Browse files Browse the repository at this point in the history
this configuration variable controls how many root versions
the client will upgrade in a single refresh(). The idea is to prevent
a malicious repository from filling the disk with root versions.

We want a number that is high enough that a repository should not have
made that many roots in the time that clients take to update the "embedded"
root that the client shipped with ship with.

32 is small enough that a repository could reach it while clients with
v1 embedded in them are still in use. Let's bump to 256: this should be
plenty.

Signed-off-by: Jussi Kukkonen <[email protected]>
  • Loading branch information
jku committed Jul 17, 2024
1 parent cb9694e commit 6eaf405
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tuf/ngclient/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class UpdaterConfig:
prefixed to ngclient user agent when the default fetcher is used.
"""

max_root_rotations: int = 32
max_root_rotations: int = 256
max_delegations: int = 32
root_max_length: int = 512000 # bytes
timestamp_max_length: int = 16384 # bytes
Expand Down

0 comments on commit 6eaf405

Please sign in to comment.