intermediate capture
[rrq/hourglass.git] / howto.adoc
1 Hourglass HOWTO
2 ===============
3
4 This project is a collection of programs (scripts) that implement an
5 automated network access control policy, aptly named "Hourglass". The
6 general idea is to have the network open or closed on weekly policy
7 schedule, with an easy-to-use interface for adhoc adjustments.
8
9 Overview
10 --------
11
12 The Hourglass policy setting includes open and close times separately
13 for each weekday, as well as limits of the accumulated usage during
14 the open times. For example, one could set up the network to be open
15 between 11am and 4pm each day and each day allow for 2 hours of usage.
16
17 .Hourglass System Overview
18 image::hourglass-overview.png[align="center"]
19
20 Network "usage" is determine by the "Hourglass listener daemon" that
21 is set up to review network traffic and continuously register
22 per-minute packet count measures.
23
24 The "Hourglass policy bot" is a per-minute "cron bot" that looks at
25 the recent succession of measures to decide whether or not "usage" is
26 happening and accumulate usage periods into the current daily usage
27 time measure. It is the policy contol bot that performs the control
28 actions of closing or opening the network for traffic.
29
30 The Hourglass web service provides an HTTP based operator interface
31 for editing the applicable policy.
32
33
34 Installing Hourglass
35 --------------------
36
37
38
39 The Hourglass system includes four components:
40
41  1. User interface for policy setting
42  2. Continuous determination of network traffic (usage or not)
43  3. Continuous determination of control action 
44  4. Control actuator
45
46
47 Hourglass User Interface
48 ------------------------
49
50 This software is an HTTP service aimed at editing the Hourglass
51 control policy, held in the +control.dat+ file, as well as the control
52 override setting, in file +control-extra.dat+, whilst also showing
53 current usage measure from file +usage.dat+.
54
55 The server +hourglass-web+ is first installed with
56 ----
57 $ ./hourglass-web install
58 ----
59 That installation sets up a small +www+ sub directory with "CGI"
60 scripting to provide the Hourglass User Interface on port 1070.
61
62 Hourglass Network Traffic Capture
63 ---------------------------------
64
65 Hourglass Policy Bot
66 --------------------
67
68 Hourglass Control Actuator
69 --------------------------