Coder Social home page Coder Social logo

informaannex's Introduction

InformaCam-UnveillanceAnnex

First, a disclaimer:

This is not security software. I take security very seriously. I am absolutely not perfect; none of us are; myself especially. I've learned to value peer review very highly, and this has not been put through that yet. I would not advocate using this on anything sensitive yet, and you should take certain cautions in deployment. This is a swiss-army knife tool I built to get a certain job done. It's working quite well for me, and I only want it to get better.

Setup

  1. After cloning this repo, cd /path/to/InformaAnnex and pull down the necessary submodules with

    git submodule update --init --recursive

  2. Run ./setup.sh or pre-configure the Frontend with a .json config file (see Configure for more info) with ./setup.sh /path/to/config.json.

  3. Follow the prompts.

Configure

You may create a .json config file with any of the following directives to suit your needs.

Configuration Directives

Local Directives
  • ssh_root (str) The full path to your SSH config

  • annex_dir (str) The full path to your local submission folder (which should not exist beforehand!)

  • uv_server_host (str) The Annex server's hostname

  • uv_uuid (str) The shortcode for the server

InformaCam-specific Directives
  • org_name (str) Organization name

  • org_details (str) Organization details

  • gpg_dir (str) The full path to your GPG Keychain for InformaCam

  • gpg_priv_key (str) The full path to your InformaCam private key

  • repo (dict) An InformaCam Repository object (see Repos for more information.)

Repos

InformaCam Annex can automatically pull submissions from Google Drive or from Globaleaks. To register a repository in your .json configuration file (pre-setup), format your repository accordingly:

Google Drive
{
	"source" : "google_drive",
	"asset_id" : "email to use for drive account",
	"account_type" : "user" or "service",
	"p12" : "path to p12 for authentication (ONLY for service account_type!)",
	"client_secrets" : "path to client_secrets.json for authentication (ONLY for service account_type!)",
	"client_id" : "client_id (ONLY for user account_type; check API console!)",
	"client_secret" : "client_secret (ONLY for user account_type; check API console!)"
}
Globaleaks
{
	"source" : "globaleaks",
	"asset_id" "your instance's context gus",
	"host" : "globaleaks server host",
	"asset_root" : "path to globaleaks assets on server",
	"user" : "globaleaks server user",
	"public_url" : "globaleaks instance .onion address",
	"identity_file" : "identity file to use to address globaleaks server"
}

Forms

Your forms should be in .xml format, and adhere to the JavaRosa specification. You can have as many forms as you'd like. Make sure they are all in an accessible folder somewhere on the host. You will be prompted for their absolute path during setup and they will be pulled in for use.

Messaging

The Annex will broadcast the status of all tasks to connected web Frontend clients via websocket.

Format

Messages from the annex channel will have the following format:

{
	"_id" : "c895e95034a4a37eb73b3e691e176d0b",
	"status" : 302,
	"doc_id" : "b721079641a39621e08741c815467115",
	"task_path" : "Image.preprocess_image.preprocessImage",
	"task_type" : "UnveillanceTask"
}

The annex channel will also send messages acknowledging the status of the connection. Developers can do with that what they will. The _id field is the task's ID in our database, the doc_id field represents the document in question (where available).

Status Codes

  • 201 (Created) Task has been registered.
  • 302 (Found) Task is valid, and can start.
  • 404 (Not Found) Task is not valid; cannot start.
  • 200 (OK) Task completed; finishing.
  • 412 (Precondition Failed) Task failed; will finish in failed state.
  • 205 (Reset Content) Task persists, and will run again after the designated period.
  • 410 (Gone) Task deleted from task queue.

informaannex's People

Contributors

harlo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

unveillance

informaannex's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.