Güvenlik bir sunucu kararıdır, widget durumu değildir.
2IZI Guard formları ve herkese açık eylemleri yerel risk değerlendirmesi, uyarlanabilir sürtünme ve tek kullanımlık sunucu yetkilendirme tokenlarıyla korur. Zorunlu harici CAPTCHA yoktur.
Küçük entegrasyon yüzeyi. Son izin sunucuda kalır.
Mevcut core PHP 8.1+ hedefler ve security boundary’de framework bağımsızdır. Her actionı açıkça koruyun ve business operationdan önce tokenı tüketin.
1. Frontend
<script src="/guard/public/assets/guard.js?v=0.4.10" defer></script> <form data-guard-action="contact"> … </form>
2. Protected action
$result = Guard::verifyAndConsume(
$_POST['guard_token'] ?? '',
'contact'
);
if (!$result->allowed()) {
http_response_code(403);
exit;
}Tipik actions
loginregisterpassword_resetcontactcheckoutfile_uploadBir korunan action. Beş bağımsız kontrol noktası.
Tarayıcı challenge’a katılabilir, ancak iş izni her zaman sunucuda üretilir ve tüketilir.
Bağlamı doğrula
Pahalı işten önce Origin, action, session ve kaba limitleri kontrol et.
Yerel puanla
Sunucu ve uygulama sinyalleri açıklanabilir risk kararı üretir.
Sürtünme ekle
Policy PASS, PoW, interaction, throttle veya deny seçer.
Bir kez üret
Rastgele 256-bit opaque token session/action/origin ve kısa TTL’ye bağlanır.
Atomik tüket
Business endpoint bir kez tüketir; replay, mismatch ve expiry reddedilir.
Policy modes
Güvenilir trafik sessiz geçebilir; yüksek risk PoW, hold, throttle veya deny tetikleyebilir.
Integration contract
Mevcut core PHP 8.1+ hedefler ve security boundary’de framework bağımsızdır. Her actionı açıkça koruyun ve business operationdan önce tokenı tüketin.
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 token · yalnız hash saklama · kısa TTL · action/session/origin binding · HMAC integrity · one-time atomic consume · server-only business signals · kritik actionlarda fail-closed.
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.
Saldırganın tüm kod tabanını bildiğini varsayarız.
Kod, JavaScript, API, DB şeması, PoW ve eşikler bilinebilir; sırlar ve yetkilendirme sunucuda kalır.
Saldırganda olduğunu varsayarız
- tam kaynak kod
- modern AI modelleri
- Playwright / Selenium / headless Chromium
- residential proxy
- kendi trafik kayıtları
Güvenlik şunları gizlemeye dayanmaz
- JavaScript
- challenge algoritması
- alan adları
- endpoints
- risk thresholds
Açık kod denetlenebilirliği artırmalı, modeli zayıflatmamalı.
Uygulamayı okumak authorization bypass üretmemeli. Public review disiplinli release, key, repository permission ve vulnerability handling gerektirir.
Yayınla
- source ve değişiklik geçmişi
- SECURITY.md ve responsible disclosure
- threat model ve mimari
- otomatik security / red-team tests
- release checksum ve notes
Özel tut
- production config/guard.php
- APP_KEY ve HMAC/privacy/rate-limit keys
- DB dump ve gerçek security events
- gerçek cookie/token/session
- deployment secret ve private infrastructure
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 · aktif geliştirme
Mevcut branch security-first architecture ve otomatik regression/red-team coverage içerir. Önce Shadow Mode, sonra gerçek trafikte enforcement kalibrasyonu.