graphite-project/graphite-web — pull request #387 by Silox (2013-08-09 15:11:05+00:00)
Title: User authentication and data limitation for job based high performance computing systems

This is a rebase from #384 to the master branch. Addition: I don't expect this to get fixed as it would break everything. This is more of a "Hey, I did this!"-PR if anyone would be interested.

This pull request provides all the necessary patches to turn Graphite into a monitoring system usable for high performance computing. At my internship at [HPC UGent](http://www.ugent.be/hpc/en), I was asked to provide or extend a framework which would allow the users to see a graphical overview of their jobs and how performant their jobs ran on the clusters, while hiding information they shouldn't be able to see (e.g. data from other users) for privacy reasons. Graphite (in combination with Collectl) turned out to be perfect for this job, so I started from the 0.9.x and built in the requested functionality and then rebased to master. The plan is to run an instance of this version of Graphite for job overview next to a unmodified graphite for (admin) node purposes as it would have been a total mess to support both versions next to eachother from the same codebase.

Short list of features:

* The whole structure is converted to work with jobs instead of raw nodes. Each job has underlying nodes where the job has run on.
* Users are only able to see their own jobs, nodes and data. All other data will get hidden from them.
* The new search allows users to search trough their jobs by cluster name, start date, end date and job status.
* Users can be granted the `see_all_permission` to see all data (= admin/support functionality).

Changes needed to make this work on your own server/cluster/configuration:

* `jobs.py` contains SQLAlchemy statements specific to our database; change functions as needed. At the moment, we use the columns for job name, unique job id, job state, cluster, user, start time and end time. It should not be a big change to modify this according to your own database.
* Add corresponding log in middleware
* Add the `see_all_permission` to your own Django database

Screenshots:

![sc1](http://i.imgur.com/1cspEwf.png)
![sc2](http://i.imgur.com/JpYmxFq.png)
![sc3](http://i.imgur.com/59nnN94.png)