Seclib implementation for the Snap webserver
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Computing Science (ex-Software Technology) Colloquium
Dragos Ionita

Unfortunately, the cabal file does not work due to 'Butterfy effect' problems

To start the web application, install all required libraries, solve conflicts, 
and then run:

> ghci -i./src ./src/Main.hs

After ghci starts successfully, call `main' to start the web server.

Then, access the web application at http://localhost:8000/
To log in as S (superuser), the database contains the following account:
Username: 'admin', Password: 'admin' (without the quotes).

Controllers/              Untrusted     Routes in the SnapSec monad
    Common.hs                           Common functions 
Frontend.hs                             Front-end (for anonymous users)
    Login.hs                            Login/logout routes
    Posts.hs                            Post CRUD actions
    Users.hs                            User CRUD actions
    DB/                       Trusted
    Common.hs                           Common database definitions
    Post.hs                             Post Entity instances
    User.hs                             User Entity instances, various data definitions
    SecLib/                   Trusted
    DeclCombinators.hs                  Declassification combinators
    DeclCombinatorsTypes.hs             Declassification datatypes
    Declassification.hs                 Exports declassification functions and datatypes
    Lattice.hs                          User level definitions
    Sec.hs                              Secure pure values
    SecLib.hs                           Module to be imported by untrusted code
    SecLibTypes.hs                      Exports lattice types
    SnapSec.hs                          Restricted Snap monad
    Controllers.hs            Untrusted Convenience module to export all routes 
    Forms.hs                  Untrusted Defines formlets
    Utils.hs                  Untrusted Utility functions for untrusted code
    DB.hs                     Trusted   Convenience module to export all entities
    Glue.hs                   Trusted   Snap server code
    Main.hs                   Trusted   Main server code, choosing which route to take
    Policies.hs               Trusted   Contains declassification policies
    Routes.hs                 Trusted   Part of the type-safe URLs and routing system
    Routing.hs                Trusted   Part of the type-safe URLs and routing system
    Server.hs                 Trusted   Server configuration code
    UtilsTrusted.hs           Trusted   Utility functions for trusted code
    static/                             Resource files e.g. images, CSS stylesheets
    news.db                             Sqlite database, persistent data storage
    lcookie.key                         Cookie encryption private key