Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ services:
sh -c "
/usr/bin/mc alias set st-messages $${MC_HOST} st-messages password && \
/usr/bin/mc mb st-messages/msg-imports --ignore-existing && \
/usr/bin/mc mb st-messages/msg-blobs --ignore-existing && \
/usr/bin/mc ilm rule rm --all --force st-messages/msg-imports || true && \
/usr/bin/mc ilm rule add --expire-days 1 st-messages/msg-imports"

Expand Down
16 changes: 16 additions & 0 deletions env.d/development/backend.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ STORAGE_MESSAGE_IMPORTS_ACCESS_KEY=st-messages
STORAGE_MESSAGE_IMPORTS_SECRET_KEY=password
STORAGE_MESSAGE_IMPORTS_EXPIRE_POLICY=600

# Blob encryption keys (JSON dict: {"1": "key1", "2": "key2"}). Empty = no encryption
# Works for both PostgreSQL and object storage blobs
MESSAGES_BLOB_ENCRYPTION_KEYS=
# Which key ID to use for new encryptions (must exist in MESSAGES_BLOB_ENCRYPTION_KEYS)
MESSAGES_BLOB_ENCRYPTION_ACTIVE_KEY_ID=0

# Object storage for tiered blob storage (empty = disabled)
STORAGE_MESSAGE_BLOBS_ENDPOINT_URL=http://objectstorage:9000
STORAGE_MESSAGE_BLOBS_BUCKET_NAME=msg-blobs
STORAGE_MESSAGE_BLOBS_ACCESS_KEY=st-messages
STORAGE_MESSAGE_BLOBS_SECRET_KEY=password
# Tiered storage offload (disabled by default, enable to offload blobs to S3)
TIERED_STORAGE_OFFLOAD_ENABLED=False
# Offload blobs older than N days (0 = immediately)
TIERED_STORAGE_OFFLOAD_AFTER_DAYS=3

# OIDC
OIDC_OP_JWKS_ENDPOINT=http://keycloak:8802/realms/messages/protocol/openid-connect/certs
OIDC_OP_AUTHORIZATION_ENDPOINT=http://localhost:8902/realms/messages/protocol/openid-connect/auth
Expand Down
3 changes: 1 addition & 2 deletions src/backend/core/api/viewsets/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ def get(self, request):
]
dict_settings = {}
for setting in array_settings:
if hasattr(settings, setting):
dict_settings[setting] = getattr(settings, setting)
dict_settings[setting] = getattr(settings, setting, None)

# AI Features
dict_settings["AI_ENABLED"] = is_ai_enabled()
Expand Down
7 changes: 7 additions & 0 deletions src/backend/core/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ class CompressionTypeChoices(models.IntegerChoices):
ZSTD = 1, "Zstd"


class BlobStorageLocationChoices(models.IntegerChoices):
"""Defines where blob content is stored (tiered storage)."""

POSTGRES = 1, "PostgreSQL"
OBJECT_STORAGE = 2, "Object Storage"


class DKIMAlgorithmChoices(models.IntegerChoices):
"""Defines the possible DKIM signing algorithms."""

Expand Down
Loading
Loading