Skip to content

Commit 6eaf405

Browse files
committed
ngclient: Increase default max_root_rotations
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 <jkukkonen@google.com>
1 parent cb9694e commit 6eaf405

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tuf/ngclient/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class UpdaterConfig:
4444
prefixed to ngclient user agent when the default fetcher is used.
4545
"""
4646

47-
max_root_rotations: int = 32
47+
max_root_rotations: int = 256
4848
max_delegations: int = 32
4949
root_max_length: int = 512000 # bytes
5050
timestamp_max_length: int = 16384 # bytes

0 commit comments

Comments
 (0)