forked from mtusi2026/mtusi2026lab7
ЛР 7: безопасность, mTLS и OpenBao на оценку 3
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
-- API owns business operations. The two background processes have separate roles.
|
||||
GRANT SELECT, INSERT ON users, chats, chat_members, messages TO messenger_api;
|
||||
GRANT SELECT, INSERT ON attachments TO messenger_api;
|
||||
GRANT INSERT ON outbox_events TO messenger_api;
|
||||
GRANT SELECT (created_at) ON outbox_events TO messenger_api;
|
||||
|
||||
GRANT SELECT ON attachments TO messenger_worker;
|
||||
GRANT UPDATE (status, error_code, updated_at, lease_expires_at, thumbnail_key,
|
||||
thumbnail_sha256, thumbnail_size_bytes, thumbnail_width,
|
||||
thumbnail_height, crop_key, webp_key)
|
||||
ON attachments TO messenger_worker;
|
||||
|
||||
GRANT SELECT ON attachments, outbox_events TO messenger_outbox;
|
||||
GRANT UPDATE (status, lease_expires_at, updated_at) ON attachments TO messenger_outbox;
|
||||
GRANT INSERT ON outbox_events TO messenger_outbox;
|
||||
GRANT UPDATE (published_at) ON outbox_events TO messenger_outbox;
|
||||
Reference in New Issue
Block a user