This project is about investigating the encrypted database CryptDB developed at MIT in 2011.
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.
git clone https://github.com/klevstad/CryptDB_Docker.git
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)
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')
sudo docker exec -it **name-of-container** bash
#Example:
sudo docker exec -it cryptdb bash
/opt/cryptdb.sh start
# For stopping the proxy server: /opt/cryptdb.sh stop
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