stork logo
Using Stork

The TPFile

The following shows how to manually modify a simple TPFile created through storkutil.

The first step is to extract your TPFile. To do this, use the command: ./storkutil.py extract USERNAME.publickey.tpfile NEWFILE
Where NEWFILE is the file that will be created. This newfile contains your TPFile. You can now edit this file using any text editor. The following shows the breakdown of the extracted TPFile:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>

<TRUSTEDPACKAGES>

<USER PATTERN="mypackage.tar.gz" USERNAME="who" PUBLICKEY="MFwwDQYJKoZIhv cNAQEBBQADS wAwSAJ BALACAiS4s Yg_6tdinzwIt0 RT3l6 U699 vPiA3wqgHjF4qlQa JdzCZ6Vg8h d2tDH5Lucs7KF3s+yDWj fq+XYaOVUCAwEAAQ" ORDER-BY="default" ACTION="ALLOW"/>

<FILE PATTERN="mypackage2.tar.gz" HASH="eb12b​9d24fef30fce7​3a393896​3abfef9b245e5a" TIMESTAMP="1173298131.66" TAGS="" ACTION="ALLOW"/>

<FILE PATTERN="mypackage.tar.gz" HASH="1cd77e04ac5e​8546833d1​86cb40d5f4​0d4ffdeff" TIMESTAMP="1172370481.15" TAGS="" ACTION="DENY"/>

<USER PATTERN="*" USERNAME="default" PUBLICKEY="MFwwDQYJKoZIhvc​NAQEBBQADSwAwSAJ​BAKgZCjfKDl9ISoclf​BuZsQze6bXtu+QYF6​4TLQlI9fgEg2CDyGQ​VOsZ2CaX1ZEZ_O69A​YZp8nj+YJLIJM3+W​3DMCAwEAAQ" ACTION="ALLOW"/>

</TRUSTEDPACKAGES>

We can look at this TPFile piece by piece.

XML information:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>

The start of the trusted packages list:
<TRUSTEDPACKAGES>

The "USER PATTERN=" part of this file used for the command. It lists a user, the user's publickey, the action which we have decided for the user (ALLOW, DENY, ANY) and the packages to which this action applies.
<USER PATTERN="mypackage.tar.gz" USERNAME="who" PUBLICKEY="MFwwDQYJKo ZIhvcNAQEBBQ ADSwAwSAJBAL ACAiS4sYg_6t dinzwIt0RT 3l6U699vPi A3wqgHjF4ql QaJdzC Z6Vg8h ad2tD H5Lucs7KF3s+yDWjfq+XYaOVUCAwEAAQ" ORDER-BY="default" ACTION="ALLOW"/>

The following two lines are nearly the same as above, but for a addfile command instead of adduser. The lines list first the file to be trusted, and then the file's hashcode and timestamp (in case of an invalid file with the same name as a trusted one). The action, like in the adduser case, lists whether we ALLOW, DENY or ANY the package. The TAGS portion of the line is used to attach tags to packages. For more information on tags, please see the using tags page.
<FILE PATTERN="mypackage2.tar.gz" HASH="eb12b9d24fef30fce73a3938963abfef9b245e5a" TIMESTAMP="1173298131.66" TAGS="" ACTION="ALLOW"/>

<FILE PATTERN="mypackage.tar.gz" HASH="1cd77e04ac5e8546833d186cb40d5f40d4ffdeff" TIMESTAMP="1172370481.15" TAGS="" ACTION="DENY"/>

The final line is the line that should be present in all new TPFiles. If this line is not present, it means that stork could not find the default.publickey file (which is included in the enduser tarball) when the TPFile was generated. You will need to trust the default user in order to accept packages from Stork and PlanetLab.

<USER PATTERN="*" USERNAME="default" PUBLICKEY="MFwwDQYJKoZIhvc​NAQEBBQADSwAwSAJ​BAKgZCjfKDl9ISoclf​BuZsQze6bXtu+QYF6​4TLQlI9fgEg2CDyGQ​VOsZ2CaX1ZEZ_O69A​YZp8nj+YJLIJM3+W​3DMCAwEAAQ" ACTION="ALLOW"/>

We then have the end of the trusted packages list:
</TRUSTEDPACKAGES>

After you finish modifying your TPFile, you can then use the storkutil.py sign newFile command to sign your extracted file. Once your file has been signed, you can either manually rename the file username.publickey.tpfile, or you can use the pubkeyembed command to automatically rename your file:

storkutil.py pubkeyembed newFile
File 'newFile' has been copied to ' newFile.publickey'

Note that you will need to add the .tpfile to the end of this filename.

Home Top
powered by planetlab University of Arizona, Computer Science logo