Hourglass HOWTO =============== This project is a collection of programs (scripts) that implement an automated network access control policy, aptly named "Hourglass". The general idea is to have the network open or closed on weekly policy schedule, with an easy-to-use interface for adhoc adjustments. Overview -------- The Hourglass policy setting includes open and close times separately for each weekday, as well as limits of the accumulated usage during the open times. For example, one could set up the network to be open between 11am and 4pm each day and each day allow for 2 hours of usage. .Hourglass System Overview image::hourglass-overview.png[align="center"] Network "usage" is determine by the "Hourglass listener daemon" that is set up to review network traffic and continuously register per-minute packet count measures. The "Hourglass policy bot" is a per-minute "cron bot" that looks at the recent succession of measures to decide whether or not "usage" is happening and accumulate usage periods into the current daily usage time measure. It is the policy contol bot that performs the control actions of closing or opening the network for traffic. The Hourglass web service provides an HTTP based operator interface for editing the applicable policy. Installing Hourglass -------------------- The Hourglass system includes four components: 1. User interface for policy setting 2. Continuous determination of network traffic (usage or not) 3. Continuous determination of control action 4. Control actuator Hourglass User Interface ------------------------ This software is an HTTP service aimed at editing the Hourglass control policy, held in the +control.dat+ file, as well as the control override setting, in file +control-extra.dat+, whilst also showing current usage measure from file +usage.dat+. The server +hourglass-web+ is first installed with ---- $ ./hourglass-web install ---- That installation sets up a small +www+ sub directory with "CGI" scripting to provide the Hourglass User Interface on port 1070. Hourglass Network Traffic Capture --------------------------------- Hourglass Policy Bot -------------------- Hourglass Control Actuator --------------------------