3. Sample request for a restricted access file

Here's an example of a URL of a file from a restricted web repository. This URL is too long to fit on one line. It is broken up into multiple lines, for readability:


The URL of this repository is http://www.example.com/dev/lpm. The path portion of the computed hash is packages/lpmtool-0.01-199.i386.lp, and the authorization key is citizenkane:rosebud:

$ echo 'packages/lpmtool-0.01-199.i386.lp/1124060128/rosebud' \
  | tr -d '\012' | sha1sum
a7011d551edc4e92677023138f1ae1ea363654fc  -

3.1. Reference implementation

A very basic implementation of a restricted access repository can be set up using the lpmauthrepo and setauthrepo scripts, which are included with LPMtool. These scripts require a modern version of the Apache HTTP server, and Perl. See the lpmauthrepo(8) and setauthrepo(8) manual pages for more information.