v0.1.8 - Removed cache functionality for now
This commit is contained in:
@@ -68,19 +68,6 @@ CREATE TABLE IF NOT EXISTS auth_rules (
|
||||
UNIQUE(rule_type, rule_target, operation)
|
||||
);
|
||||
|
||||
-- Cache table for authentication decisions (5-minute TTL)
|
||||
CREATE TABLE IF NOT EXISTS auth_rules_cache (
|
||||
cache_key TEXT PRIMARY KEY NOT NULL, -- SHA-256 hash of request parameters
|
||||
decision INTEGER NOT NULL, -- 1 = allow, 0 = deny
|
||||
reason TEXT, -- Reason for decision
|
||||
pubkey TEXT, -- Public key from request
|
||||
operation TEXT, -- Operation type
|
||||
resource_hash TEXT, -- Resource hash (if applicable)
|
||||
created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
expires_at INTEGER NOT NULL, -- Expiration timestamp
|
||||
|
||||
CHECK (decision IN (0, 1))
|
||||
);
|
||||
|
||||
-- Indexes for performance optimization
|
||||
CREATE INDEX IF NOT EXISTS idx_auth_rules_type_target ON auth_rules(rule_type, rule_target);
|
||||
@@ -89,9 +76,6 @@ CREATE INDEX IF NOT EXISTS idx_auth_rules_enabled ON auth_rules(enabled);
|
||||
CREATE INDEX IF NOT EXISTS idx_auth_rules_priority ON auth_rules(priority);
|
||||
CREATE INDEX IF NOT EXISTS idx_auth_rules_type_operation ON auth_rules(rule_type, operation, enabled);
|
||||
|
||||
-- Index for cache expiration cleanup
|
||||
CREATE INDEX IF NOT EXISTS idx_auth_cache_expires ON auth_rules_cache(expires_at);
|
||||
CREATE INDEX IF NOT EXISTS idx_auth_cache_pubkey ON auth_rules_cache(pubkey);
|
||||
|
||||
-- View for storage statistics
|
||||
CREATE VIEW IF NOT EXISTS storage_stats AS
|
||||
|
||||
Reference in New Issue
Block a user