2IZI Guard · 0.4.10 · PRE-1.0

เอกสาร

Core ปัจจุบันมุ่ง PHP 8.1+ และ framework-independent ที่ security boundary ปกป้องแต่ละ action อย่างชัดเจนและ consume token ก่อน business operation

สำหรับการกระทำของแอป

ความปลอดภัยคือการตัดสินใจของเซิร์ฟเวอร์ ไม่ใช่สถานะของ widget

2IZI Guard ปกป้องฟอร์มและการกระทำสาธารณะด้วยการประเมินความเสี่ยงภายในระบบ friction แบบปรับตัว และ token อนุญาตจากเซิร์ฟเวอร์แบบใช้ครั้งเดียว โดยไม่บังคับใช้ CAPTCHA ภายนอก

PHP 8.1+Core runtime
MariaDB / MySQLBaseline storage
0required outbound runtime calls
256-bitopaque token entropy
PRE-1.0Branch ปัจจุบันเป็น security-first architecture พร้อม automated regression/red-team coverage เริ่มด้วย Shadow Mode แล้ว calibrate enforcement บน traffic จริง
Quick start

พื้นผิว integration เล็ก สิทธิ์สุดท้ายอยู่บนเซิร์ฟเวอร์

Core ปัจจุบันมุ่ง PHP 8.1+ และ framework-independent ที่ security boundary ปกป้องแต่ละ action อย่างชัดเจนและ consume token ก่อน business operation

1. Frontend

FrontendHTML
<script src="/guard/public/assets/guard.js?v=0.4.10" defer></script>
<form data-guard-action="contact">
  …
</form>

2. Protected action

Protected actionPHP
$result = Guard::verifyAndConsume(
    $_POST['guard_token'] ?? '',
    'contact'
);

if (!$result->allowed()) {
    http_response_code(403);
    exit;
}

Actions ทั่วไป

loginregisterpassword_resetcontactcheckoutfile_upload
Server authorityJavaScript สำเร็จไม่เท่ากับ authorization เซิร์ฟเวอร์ตรวจและ consume Guard token
ทำงานอย่างไร

หนึ่ง action ที่ป้องกัน ห้าจุดตรวจอิสระ

Browser อาจมีส่วนใน challenge แต่ business permission ออกและ consume โดยเซิร์ฟเวอร์เสมอ

01

ตรวจ context

ตรวจ Origin, action, session และ limits พื้นฐานก่อนงานที่มีต้นทุนสูง

02

ประเมินภายใน

สัญญาณจาก server และ application สร้าง risk decision ที่อธิบายได้

03

เพิ่ม friction

Policy เลือก PASS, PoW, interaction, throttle หรือ deny

04

ออก token ครั้งเดียว

สุ่ม 256-bit opaque token ผูกกับ session/action/origin และ TTL สั้น

05

Consume แบบ atomic

Business endpoint consume ครั้งเดียว และปฏิเสธ replay, mismatch, expiry

Policy modes

ShadowObserve and predict; no enforcement.
InvisibleNo visible challenge.
AdaptiveRisk-based PASS / PoW / interaction / deny.
Always challengeRequire step-up for every protected request.

traffic ที่เชื่อถือได้ผ่านได้เงียบ ๆ ส่วนความเสี่ยงสูงอาจใช้ PoW, hold, throttle หรือ deny

การเชื่อมต่อ

Integration contract

Core ปัจจุบันมุ่ง PHP 8.1+ และ framework-independent ที่ security boundary ปกป้องแต่ละ action อย่างชัดเจนและ consume token ก่อน business operation

Action registry

The server defines allowed action names. Never use a client-provided action as authorization context.

'contact' => [
  'mode' => 'adaptive',
  'fail_mode' => 'open_with_limit'
]

Origin / session binding

256-bit opaque tokens · hash-only storage · TTL สั้น · binding action/session/origin · HMAC integrity · one-time atomic consume · server-only business signals · fail-closed สำหรับ critical actions

UI isolation

Shadow DOM isolates Guard visuals from host CSS. It is a UI reliability layer, not a security boundary.

Localization

UI locale is BCP-47-style, UTF-8, RTL-ready, touch/keyboard compatible, and extendable with locale packs.

Threat model

สมมติว่าผู้โจมตีรู้โค้ดทั้งหมด

Source, JavaScript, API, DB schema, PoW และ threshold อาจเป็นที่รู้ได้ แต่ secret และ authorization ต้องอยู่บนเซิร์ฟเวอร์

สมมติว่าผู้โจมตีมี

  • source code ทั้งหมด
  • AI models สมัยใหม่
  • Playwright / Selenium / headless Chromium
  • residential proxies
  • captures ของ traffic ตัวเอง

Security ไม่พึ่งการซ่อน

  • JavaScript
  • challenge algorithms
  • field names
  • endpoints
  • risk thresholds
Core invariants256-bit opaque tokens · hash-only storage · TTL สั้น · binding action/session/origin · HMAC integrity · one-time atomic consume · server-only business signals · fail-closed สำหรับ critical actions
ข้อจำกัดที่บอกตรง ๆไม่มี browser challenge ใดพิสูจน์ “มนุษย์ทางชีววิทยา” ได้ทางคณิตศาสตร์ Critical actions ยังต้องใช้ passkey/WebAuthn, MFA, verified accounts, transaction authorization และ business limits
โอเพนซอร์ส

โค้ดสาธารณะควรเพิ่มความสามารถในการตรวจสอบ ไม่ใช่ทำให้โมเดลอ่อนแอ

การอ่าน implementation ต้องไม่สร้าง authorization bypass Public review ต้องมี releases, keys, repository permissions และ vulnerability handling ที่มีวินัย

ควรเปิดเผย

  • source และ change history
  • SECURITY.md และ responsible disclosure
  • threat model และ architecture
  • automated security / red-team tests
  • release checksums และ notes

ควรเก็บเป็นความลับ

  • production config/guard.php
  • APP_KEY และ HMAC/privacy/rate-limit keys
  • DB dumps และ security events จริง
  • cookies/tokens/sessions จริง
  • deployment secrets และ private infrastructure
Operations

Diagnostics, tests and updates

Diagnostics

php bin/diagnose.php

Check database state, key material, Origin configuration and registered actions before enabling enforcement.

Regression / red-team

bash tests/run-all.sh

Release acceptance includes replay, proxy, risk, tampering, UI and integration checks. Run disposable MariaDB/MySQL concurrency tests where available.

Updates

Read release notes and migrations first. Do not overwrite production config/guard.php with a distribution template. Rotate keys only when a release explicitly requires it.

Rollout

Start with Shadow Mode, review predicted decisions and false positives, tune action policies, then enable calibrated enforcement.

สถานะปัจจุบัน

0.4.10 · pre-1.0 · กำลังพัฒนา

Branch ปัจจุบันเป็น security-first architecture พร้อม automated regression/red-team coverage เริ่มด้วย Shadow Mode แล้ว calibrate enforcement บน traffic จริง

PHP coreพร้อมใช้งาน
Webasyst / Shop-Script adapterหลัง core เสถียร
Verified agents / Privacy Passอนาคต / ขึ้นกับมาตรฐาน
0.4.10The responsive-layout hotfix changes UI sizing and preview embedding only; database schema, token/challenge protocol, keys, risk engine and server authorization logic are unchanged.

ภาษา

EnglishEnglishРусскийRussian简体中文Chinese (Simplified)繁體中文Chinese (Traditional)日本語Japanese한국어KoreanDeutschGermanFrançaisFrenchEspañolSpanishItalianoItalianPortuguês (Brasil)Portuguese (Brazil)العربيةArabicעבריתHebrewTürkçeTurkishPolskiPolishNederlandsDutchBahasa IndonesiaIndonesianTiếng ViệtVietnameseहिन्दीHindiPortuguês (Portugal)Portuguese (Portugal)ČeštinaCzechRomânăRomanianMagyarHungarianΕλληνικάGreekSvenskaSwedishNorskNorwegianDanskDanishSuomiFinnishไทยThai