#!/usr/bin/env python """ quickstart.py Vladimir Diaz June 2012. Based on a previous version by Geremy Condra. See LICENSE for licensing information. This script acts as a handy quickstart for TUF, helping project and repository maintainers get into the game as quickly and painlessly as possible. 'quickstart.py' creates the metadata files for all the top-level roles (along with their respective cryptographic keys), all of the target files specified by the user, and a configuration file named 'config.cfg'. The user may then use the 'signercli' script to modify, if they wish, the basic repository created by 'quickstart.py'. If executed successfully, 'quickstart.py' saves the 'repository', 'keystore', and 'client' directories to the current directory. The 'repository' directory should be transferred to the server responding to TUF repository requests. 'keystore' and the individual encrypted key files should be securely stored and managed by the repository maintainer; these files will be needed again when modifying the metadata files. 'client' should be initially distributed to users by the software updater utilizing TUF. The Update Framework may be tested locally with the output of 'quickstart.py' in two easy steps. # If you need a basic server for testing purposes $ cd repository; python -m SimpleHTTPServer 8001 # This next step is performed by the client. Here we are using the basic # client, which will securely update all target files. In a new terminal ... $ cd client; python basic_client.py --repo http://localhost:8001 # You can also test a custom client by running the 'example_client.py' script # provided with TUF. $ cd client; python example_client.py 'quickstart.py' is invoked once to set up the repository. 'signercli.py' is used to update the repository on the server. In the case of updated targets, the repository maintainer would simply add/delete target files from the 'targets' directory on the server and execute the following three commands to generate updated metadata files: $ python signercli.py --maketargets ./keystore $ python signercli.py --makerelease ./keystore $ python signercli.py --maketimestamp ./keystore The next time the client queries the server, the top-level metadata files are updated and any updated target files downloaded. $ python quickstart.py --