Giter Site home page Giter Site logo

cryptdb_docker's Introduction

This project is about investigating the encrypted database CryptDB developed at MIT in 2011.

How to setup:

1. Make sure to have Docker installed

http://docs.docker.com/v1.8/installation/

This setup is for Linux. For OS X and Windows, install Docker Toolbox and skip the sudo part of the commands.
2. Create a folder, clone project and navigate to folder containing the Dockerfile
git clone https://github.com/klevstad/CryptDB_Docker.git
3. Build docker image
sudo docker build -t **name-of-image**:**version** **.**

#Example:
sudo docker build -t cryptdb:v1 .

(Open the Docker Quickstart Terminal if OS X or Windows)

4. Run docker container based built image
sudo docker run -d --name **name-of-container** -p **port-in**:**port-out** -p **port-in**:**port-out** -e MYSQL_ROOT_PASSWORD='letmein' **name-of-image**:**version**

#Example:
sudo docker run -d --name cryptdb -p 3306:3306 -p 3307:3307 -e MYSQL_ROOT_PASSWORD='letmein' cryptdb:v1

(Important: The password must be 'letmein')

5. For accessing a docker container, use
sudo docker exec -it **name-of-container** bash

#Example:
sudo docker exec -it cryptdb bash

How to play around:

[ Terminal 1: Proxy Server ] Start the proxy server (enter container first):
/opt/cryptdb.sh start

# For stopping the proxy server: /opt/cryptdb.sh stop
[ Terminal 2: MYSQL Client ] Query database through proxy server(enter container first):
mysql -u root -pletmein -h 127.0.0.1 -P 3307
Create a database, use it, create tables, etc. Observe that the proxy server intercepts the queries and rewrites them. Also, the data is in plaintext and readable for the logged-in user.
[ Terminal 3: The Snooping Database Administrator ] Open the database without going through the proxy server.(enter container first)
mysql -u root -pletmein -h 127.0.0.1

# default port is 3306
Snoop around in the database. Observe that all the data is encrypted and impossible for you to decrypt.

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.