feat(lab7): implement secure messenger infrastructure with TLS, OpenBao and observability
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Skeleton contracts / contracts (pull_request) Blocked by required conditions
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
|
||||
-- Shared login rate limiter for both API replicas.
|
||||
-- One bucket per normalized username.
|
||||
-- Only SHA-256 of the bucket identity is stored.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS login_attempt_buckets (
|
||||
bucket_key TEXT PRIMARY KEY,
|
||||
window_started_at TIMESTAMPTZ NOT NULL,
|
||||
attempts INTEGER NOT NULL DEFAULT 0
|
||||
CHECK (attempts >= 0)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS
|
||||
idx_login_attempt_buckets_window
|
||||
ON login_attempt_buckets (window_started_at);
|
||||
Reference in New Issue
Block a user