-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Support external HMAC keys by ID and View specification with ta…
…ble SECURITY LABEL (#30) * tables can be labeled with alternate views, bytea column support. * HMAC can use encrypted external keys. * cleanup valid_key view * key tests. * remove comment. * cleanup leftover extschema * support all the symmetric aead, auth, secret and hash method for uuids. * multi-column associated data * some more key tests. * oops bad test. * user data jsonb to associated data text, more docs, cleanups. * readme. * new doc framework. * Tweak from github dev * reindent all C code. * rendered markdown files for cross checking, notebook and indent scripts.
- Loading branch information
Showing
78 changed files
with
4,885 additions
and
2,424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version=$1 | ||
shift | ||
|
||
DB_HOST="pgsodium-doc-db-$version" | ||
DB_NAME="postgres" | ||
SU="postgres" | ||
EXEC="docker exec $DB_HOST" | ||
TAG="pgsodium/test-$version" | ||
|
||
echo building test image $DB_HOST | ||
docker build -f docs/Dockerfile . -t $TAG --build-arg "version=$version" | ||
|
||
echo running test container | ||
docker run --rm -d -p 8888:8888 --net=host -v `pwd`:/pgsodium -e POSTGRES_HOST_AUTH_METHOD=trust --name "$DB_HOST" $TAG -c 'shared_preload_libraries=pgsodium' | ||
|
||
echo waiting for database to accept connections | ||
until | ||
$EXEC \ | ||
psql -o /dev/null -t -q -U "$SU" \ | ||
-c 'select pg_sleep(1)' \ | ||
2>/dev/null; | ||
do sleep 1; | ||
done | ||
|
||
docker exec -u postgres -e NB_UID=$(id -u) -e NB_GID=$(id -g) -it $DB_HOST jupyter-lab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "bronze-design", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.2" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "revolutionary-delicious", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.2" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ARG version | ||
FROM postgres:${version} | ||
ARG version | ||
|
||
RUN apt-get update && apt-get install -y make git postgresql-server-dev-${version} curl build-essential libreadline-dev pgxnclient python3-pip | ||
RUN curl -s -L https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz | tar zxvf - && cd libsodium-1.0.18 && ./configure && make check && make install | ||
|
||
RUN pip3 install ipython-sql sqlalchemy psycopg2 pgspecial ipykernel jupyterlab | ||
|
||
RUN mkdir "/pgsodium" | ||
WORKDIR "/pgsodium" | ||
COPY . . | ||
RUN make && make install | ||
RUN ldconfig | ||
RUN cd `pg_config --sharedir`/extension/ | ||
RUN cp getkey_scripts/pgsodium_getkey_urandom.sh `pg_config --sharedir`/extension/pgsodium_getkey | ||
RUN sed -i 's/exit//g' `pg_config --sharedir`/extension/pgsodium_getkey | ||
RUN chmod +x `pg_config --sharedir`/extension/pgsodium_getkey | ||
RUN chown -R postgres:postgres /pgsodium |
Oops, something went wrong.