feat: Added initial scaffold, db schema and entrypoint

This commit is contained in:
2026-06-25 10:15:12 +05:30
parent b9a7bb8319
commit a55fd2e1bd
6 changed files with 3300 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
-- Initial Schema for Bootstrap Auth Server
CREATE TABLE devices (
id INTEGER PRIMARY KEY AUTOINCREMENT,
hostname TEXT NOT NULL,
os TEXT NOT NULL,
public_key TEXT NOT NULL UNIQUE,
approved_at DATETIME,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE pending_requests (
user_code TEXT PRIMARY KEY,
device_id INTEGER NOT NULL,
challenge_nonce TEXT NOT NULL,
expires_at DATETIME NOT NULL,
FOREIGN KEY(device_id) REFERENCES devices(id) ON DELETE CASCADE
);
CREATE TABLE secrets (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key_name TEXT NOT NULL UNIQUE,
encrypted_value TEXT NOT NULL
);