080_create_tls_fingerprint_profiles.sql 1.5 KB

1234567891011121314151617181920212223242526272829
  1. -- Create tls_fingerprint_profiles table for managing TLS fingerprint templates.
  2. -- Each profile contains ClientHello parameters to simulate specific client TLS handshake characteristics.
  3. SET LOCAL lock_timeout = '5s';
  4. SET LOCAL statement_timeout = '10min';
  5. CREATE TABLE IF NOT EXISTS tls_fingerprint_profiles (
  6. id BIGSERIAL PRIMARY KEY,
  7. name VARCHAR(100) NOT NULL UNIQUE,
  8. description TEXT,
  9. enable_grease BOOLEAN NOT NULL DEFAULT false,
  10. cipher_suites JSONB,
  11. curves JSONB,
  12. point_formats JSONB,
  13. signature_algorithms JSONB,
  14. alpn_protocols JSONB,
  15. supported_versions JSONB,
  16. key_share_groups JSONB,
  17. psk_modes JSONB,
  18. extensions JSONB,
  19. created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  20. updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
  21. );
  22. COMMENT ON TABLE tls_fingerprint_profiles IS 'TLS fingerprint templates for simulating specific client TLS handshake characteristics';
  23. COMMENT ON COLUMN tls_fingerprint_profiles.name IS 'Unique profile name, e.g. "macOS Node.js v24"';
  24. COMMENT ON COLUMN tls_fingerprint_profiles.enable_grease IS 'Whether to insert GREASE values in ClientHello extensions';
  25. COMMENT ON COLUMN tls_fingerprint_profiles.cipher_suites IS 'TLS cipher suite list as JSON array of uint16 (order-sensitive, affects JA3)';
  26. COMMENT ON COLUMN tls_fingerprint_profiles.extensions IS 'TLS extension type IDs in send order as JSON array of uint16';