feat: add host self-enrollment workflow v0.1.7
All checks were successful
CI Pipeline / Rust Format Check (push) Successful in 5s
CI Pipeline / Clippy Lints (push) Successful in 53s
CI Pipeline / Rust Unit Tests (push) Successful in 1m11s
CI Pipeline / Security Audit (push) Successful in 4s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 14s
CI Pipeline / Build .deb & Release (push) Has been skipped
All checks were successful
CI Pipeline / Rust Format Check (push) Successful in 5s
CI Pipeline / Clippy Lints (push) Successful in 53s
CI Pipeline / Rust Unit Tests (push) Successful in 1m11s
CI Pipeline / Security Audit (push) Successful in 4s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 14s
CI Pipeline / Build .deb & Release (push) Has been skipped
This commit is contained in:
16
migrations/016_enrollment_requests.sql
Normal file
16
migrations/016_enrollment_requests.sql
Normal file
@ -0,0 +1,16 @@
|
||||
-- Migration: 016_enrollment_requests
|
||||
-- Description: Create enrollment_requests table for host self-enrollment
|
||||
|
||||
CREATE TABLE enrollment_requests (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
machine_id TEXT NOT NULL UNIQUE,
|
||||
fqdn TEXT NOT NULL,
|
||||
ip_address INET NOT NULL,
|
||||
os_details JSONB NOT NULL DEFAULT '{}',
|
||||
polling_token TEXT NOT NULL UNIQUE, -- Hashed polling token
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
expires_at TIMESTAMPTZ NOT NULL DEFAULT NOW() + INTERVAL '24 hours'
|
||||
);
|
||||
|
||||
CREATE INDEX idx_enrollment_requests_token ON enrollment_requests (polling_token);
|
||||
CREATE INDEX idx_enrollment_requests_expires ON enrollment_requests (expires_at);
|
||||
Reference in New Issue
Block a user