diff options
author | Christian Heimes <christian@python.org> | 2015-10-02 14:45:36 +0200 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2015-10-02 14:45:36 +0200 |
commit | a07fa7ae9d08416de8bc9994adce1353310d4ba3 (patch) | |
tree | 62d89167c7fb34323f9f1ef82583d6dfd6a7a4c5 /Makefile | |
download | gustodia-a07fa7ae9d08416de8bc9994adce1353310d4ba3.tar.gz gustodia-a07fa7ae9d08416de8bc9994adce1353310d4ba3.tar.xz gustodia-a07fa7ae9d08416de8bc9994adce1353310d4ba3.zip |
Initial commit with first working hack
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..534ad1f --- /dev/null +++ b/Makefile @@ -0,0 +1,46 @@ +VENV=venv +PYTHON=python2.7 +CUSTODIA=${VENV}/bin/custodia +REQUIREMENTS=cryptography jwcrypto git+https://github.com/simo5/custodia +CURL_CMD=curl --unix-socket server_socket -H "REMOTE_USER: user" + +all: ${CUSTODIA} + +${VENV}: + virtualenv --python=${PYTHON} ${VENV} + ${VENV}/bin/pip install --upgrade pip setuptools + +${CUSTODIA}: | ${VENV} + ${VENV}/bin/pip install ${REQUIREMENTS} + +gustodia: gustodia.go + go build $< + +.PHONY=example +example: gustodia + env -i EXAMPLE=foo CUSTODIA_SECRET_DB_PASSWORD=tests/mysecret \ + ./gustodia ./entrypoint.sh apache + +.PHONY=run_server +run_server: ${CUSTODIA} + ${CUSTODIA} + +.PHONY=init_secret +init_secret: + ${CURL_CMD} -X POST http://localhost/secrets/tests/ + ${CURL_CMD} -H "Content-Type: application/json" \ + -X PUT \ + -d '{"type": "simple", "value": "SuperSecretPassword"}' \ + http://localhost/secrets/tests/mysecret + +.PHONY=upgrade +upgrade: | ${VENV} + ${VENV}/bin/pip install --upgrade ${REQUIREMENTS} + +.PHONY=clean +clean: + @rm -rf ${VENV} + @rm -rf secrets.db + @rm -f custodia.audit.log + @rm -f gustodia + @rm -f server_socket |