2020- [ Consistent Snapshots] ( #consistent-snapshots )
2121
2222
23- ## How to Create and Modify a TUF Repository ##
23+ ## How to Create and Modify a Basic TUF Repository ##
2424
2525
2626### Overview ###
@@ -30,8 +30,8 @@ The [tuf.client.updater](client/README.md) module and
3030[ tuf.interposition] ( interposition/README.md ) package assist in integrating
3131TUF on the client side. Second, the repository on the server side must
3232be modified to include a minimum of four metadata files. No additional software
33- is required to convert a repository to a TUF one. The tool to assist in generating
34- the required metadata files of the repository is the focus of this document.
33+ is required to convert a repository to a TUF one. The tool to generate the
34+ required metadata files of the repository is the focus of this document.
3535
3636
3737The [ repository tool] ( repository_tool.py ) contains functions to generate all the
@@ -73,7 +73,7 @@ covering keys, the four required top-level roles are introduced. Examples are
7373given demonstrating the expected work flow, where the metadata roles are created
7474in a specific order, keys imported and loaded, and the metadata objects signed and
7575written to disk. Lastly, target files are added to the repository, included in
76- metadata, and custom delegations performed to extend the default roles in the
76+ metadata, and custom delegations performed to extend the default roles of the
7777repository. By the end, a fully populated TUF repository is generated that can be
7878tested.
7979
@@ -282,7 +282,7 @@ TUF verifies target files by including their length, hash(es),
282282and filepath in metadata. The filepaths are relative to a `targets/ ` directory
283283on the repository. A TUF client can download a target file by first updating
284284the latest copy of metadata (and thus available targets), verifying that their
285- length and hashes are valid, and then saving them locally to complete the
285+ length and hashes are valid, and then saving them locally to complete the update
286286process.
287287
288288In this section, the target files intended for clients are added to a repository
@@ -292,8 +292,8 @@ and listed in `targets.json` metadata.
292292
293293The repository maintainer adds target files to roles (e.g., `targets` ,
294294`targets/ unclaimed` ) by specifying target paths. Files at these target paths
295- must exist before the repository tool can generate and add their (hashes ,
296- lengths , filepath) to metadata.
295+ must exist before the repository tool can generate and add their (hash (es) ,
296+ length , filepath) to metadata.
297297
298298The actual target files are added first to the `targets/ ` directory of the
299299repository.
@@ -418,19 +418,19 @@ and generate signed metadata, according to the keys and paths allowed by the par
418418>> > private_unclaimed_key = import_rsa_privatekey_from_file(" /path/to/unclaimed_key" )
419419Enter a password for the encrypted RSA key:
420420
421- >> > repository.targets(unclaimed).load_signing_key(private_unclaimed_key)
421+ >> > repository.targets(" unclaimed" ).load_signing_key(private_unclaimed_key)
422422
423423# Update an attribute of the unclaimed role.
424- >> > repository.targets(' unclaimed' ).version = 2
424+ >> > repository.targets(" unclaimed" ).version = 2
425425
426426# Delegations may also be nested. Create the delegated role "targets/unclaimed/django",
427427# where it initially contains zero targets and future targets are restricted to a
428428# particular directory.
429- >> > repository.targets(' unclaimed' ).delegate(" django" , [public_unclaimed_key], [],
429+ >> > repository.targets(" unclaimed" ).delegate(" django" , [public_unclaimed_key], [],
430430 restricted_paths = [" /path/to/repository/targets/django/" ])
431- >> > repository.targets(' unclaimed' )( ' django' ).load_signing_key(private_unclaimed_key)
432- >> > repository.targets(' unclaimed' )( ' django' ).add_target(" /path/to/repository/targets/django/file4.txt" )
433- >> > repository.targets(' unclaimed' )( ' django' ).compressions = [" gz" ]
431+ >> > repository.targets(" unclaimed" )( " django" ).load_signing_key(private_unclaimed_key)
432+ >> > repository.targets(" unclaimed" )( " django" ).add_target(" /path/to/repository/targets/django/file4.txt" )
433+ >> > repository.targets(" unclaimed" )( " django" ).compressions = [" gz" ]
434434
435435# Write the metadata of "targets/unclaimed", "targets/unclaimed/django", root, targets, snapshot,
436436# and timestamp.
@@ -482,7 +482,7 @@ questions.
482482A large number of target files may be distributed to multiple hashed bins with
483483`delegate_hashed_bins()` . The metadata files of delegated roles will be nearly equal in size
484484(i.e., target file paths are uniformly distributed by calculating the target filepath' s
485- digest and determining which bin it should reside in . The updater client will use
485+ digest and determining which bin it should reside in .) The updater client will use
486486" lazy bin walk" to find a target file ' s hashed bin destination. This method is intended
487487for repositories with a large number of target files, a way of easily distributing and
488488managing the metadata that lists the targets, and minimizing the number of metadata files
0 commit comments