ЛР 7: безопасность, mTLS и OpenBao на оценку 3
Skeleton contracts / contracts (pull_request) Blocked by required conditions

This commit is contained in:
2026-12-06 15:19:24 +03:00
parent 20afc2c790
commit 280c5a3300
101 changed files with 5950 additions and 63 deletions
+23
View File
@@ -0,0 +1,23 @@
import threading
from minio import Minio
from app.transport import s3_transport
from app.config import S3_ENDPOINT, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_BUCKET
users_lock = threading.Lock()
messages_lock = threading.Lock()
users_by_id: dict[str, dict] = {}
users_by_username: dict[str, dict] = {}
chats_by_id: dict[str, dict] = {}
messages_by_chat: dict[str, list[dict]] = {}
endpoint = S3_ENDPOINT.replace("http://", "").replace("https://", "")
minio_client = Minio(
endpoint,
access_key=S3_ACCESS_KEY_ID,
secret_key=S3_SECRET_ACCESS_KEY,
**s3_transport(S3_ENDPOINT),
)
BUCKET = S3_BUCKET