Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update django demo with type awareness #47

Merged
merged 2 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions django/acra-server-configs/encryptor_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
defaults:
crypto_envelope: acrablock

schemas:
- table: "blog_entries"
columns:
- id
- headline
- slug
- is_active
- pub_date
- content_format
- summary
- summary_html
- body
- body_html
- author
encrypted:
- column: "author"
data_type: "bytes"
default_data_value: "dW5rbm93bg=="
- column: "body"
data_type: "bytes"
default_data_value: "Tm8gcGVybWlzc2lvbg=="
- column: "body_html"
data_type: "bytes"
default_data_value: "Tm8gcGVybWlzc2lvbg=="
- column: "headline"
data_type: "bytes"
default_data_value: "Tm8gcGVybWlzc2lvbg=="
- column: "summary"
data_type: "bytes"
default_data_value: "Tm8gcGVybWlzc2lvbg=="
- column: "summary_html"
data_type: "bytes"
default_data_value: "Tm8gcGVybWlzc2lvbg=="
10 changes: 7 additions & 3 deletions django/docker-compose.django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
# - ./.acrakeys/acra-server/${ACRA_CLIENT_ID}_storage
# - ./.acrakeys/acra-writer/${ACRA_CLIENT_ID}_storage.pub
acra-keymaker_writer:
image: "cossacklabs/acra-keymaker:${ACRA_DOCKER_IMAGE_TAG:-0.92.0}"
image: "cossacklabs/acra-keymaker:${ACRA_DOCKER_IMAGE_TAG:-0.93.0}"
network_mode: "none"
environment:
ACRA_MASTER_KEY: ${ACRA_SERVER_MASTER_KEY:-N0MyZEVCRGY1cHA4ODRSVHp3c3BNeGtDekxaV3BhTHI=}
Expand All @@ -16,6 +16,7 @@ services:
--client_id=""
--tls_cert=/ssl/acra-client.crt
--generate_acrawriter_keys
vixentael marked this conversation as resolved.
Show resolved Hide resolved
--generate_symmetric_storage_key
--keys_output_dir=/keys/acra-server
--keys_public_output_dir=/keys/acra-writer
--keystore=v1
Expand Down Expand Up @@ -56,7 +57,7 @@ services:


acra-server:
image: "cossacklabs/acra-server:${ACRA_DOCKER_IMAGE_TAG:-0.92.0}"
image: "cossacklabs/acra-server:${ACRA_DOCKER_IMAGE_TAG:-0.93.0}"
# Restart server after correct termination, for example after the config
# was changed through the API
restart: always
Expand All @@ -81,7 +82,7 @@ services:
# rewriteable in case of using API, otherwise should be read-only.
- ./.acrakeys/acra-server:/keys
# Directory with configuration, rewriteable
- ./.acraconfigs/acra-server:/config
- ./acra-server-configs:/configs
- ../_common/ssl/acra-server/:/ssl
- ../_common/ssl/ca/ca.crt:/ssl/root.crt
command: >-
Expand All @@ -98,6 +99,7 @@ services:
--incoming_connection_api_string=tcp://0.0.0.0:9090
--incoming_connection_prometheus_metrics_string=tcp://0.0.0.0:9399
--config_file=/config/acra-server.yaml
--encryptor_config_file=/configs/encryptor_config.yaml
--tracing_jaeger_enable
--jaeger_agent_endpoint=''
--jaeger_collector_endpoint=http://jaeger:14268/api/traces
Expand All @@ -106,6 +108,7 @@ services:
django:
depends_on:
- acra-keymaker_writer
- acra-server
# Build and run container from source directory with demo django project
build:
context: ../
Expand Down Expand Up @@ -135,6 +138,7 @@ services:
- world
volumes:
- ./.acrakeys/acra-writer:/app.acrakeys:ro
restart: always


postgresqlweb:
Expand Down