보안 결정은 위젯 상태가 아니라 서버가 내립니다.
2IZI Guard는 로컬 위험 평가, 적응형 마찰, 일회용 서버 권한 토큰으로 폼과 공개 작업을 보호합니다. 외부 CAPTCHA 런타임은 필수가 아닙니다.
작은 통합 표면. 최종 권한은 서버에 남습니다.
현재 core는 PHP 8.1+ 대상이며 security boundary는 framework에 종속되지 않습니다. 각 action을 명시적으로 보호하고 비즈니스 작업 전에 token을 소비합니다.
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;
}대표 actions
loginregisterpassword_resetcontactcheckoutfile_upload하나의 보호 action, 다섯 개의 독립 체크포인트.
브라우저는 challenge에 참여할 수 있지만 비즈니스 권한은 항상 서버가 발급하고 소비합니다.
컨텍스트 검증
비싼 작업 전에 Origin, action, session, 기본 제한을 확인합니다.
로컬 위험 평가
서버와 애플리케이션 신호로 설명 가능한 결정을 만듭니다.
마찰 추가
정책이 PASS, PoW, interaction, throttle, deny를 선택합니다.
한 번 발급
무작위 256-bit opaque token을 session/action/origin/짧은 TTL에 묶습니다.
원자적 소비
비즈니스 endpoint가 한 번만 소비하고 replay, mismatch, expiry를 거부합니다.
Policy modes
신뢰 트래픽은 조용히 통과하고, 위험이 높으면 PoW·hold·throttle·deny가 적용됩니다.
Integration contract
현재 core는 PHP 8.1+ 대상이며 security boundary는 framework에 종속되지 않습니다. 각 action을 명시적으로 보호하고 비즈니스 작업 전에 token을 소비합니다.
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 · hash-only 저장 · 짧은 TTL · action/session/origin binding · HMAC integrity · one-time atomic consume · server-only business signals · critical action 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.
공격자가 전체 코드베이스를 안다고 가정합니다.
소스, JavaScript, API, DB schema, PoW, threshold가 알려져도 비밀과 권한은 서버에 남아야 합니다.
공격자가 가진다고 가정
- 전체 소스 코드
- 현대 AI 모델
- Playwright / Selenium / headless Chromium
- residential proxy
- 자신의 트래픽 캡처
숨김에 의존하지 않음
- JavaScript
- challenge 알고리즘
- 필드 이름
- endpoint
- risk threshold
공개 코드는 모델을 약화시키는 것이 아니라 검증 가능성을 높여야 합니다.
구현을 읽는 것만으로 authorization bypass가 생기면 안 됩니다. 공개 검토는 엄격한 release, key, repository permission, vulnerability handling과 함께해야 합니다.
공개
- 소스와 변경 이력
- SECURITY.md / responsible disclosure
- threat model / architecture
- 자동 security / red-team tests
- release checksum / notes
비공개
- production config/guard.php
- APP_KEY / HMAC/privacy/rate-limit keys
- DB dump / 실제 security events
- 실제 cookie/token/session
- deployment secret / 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 · 개발 중
현재 branch는 security-first architecture와 자동 regression/red-team coverage를 갖습니다. 먼저 Shadow Mode로 배포한 뒤 실제 traffic에서 enforcement를 조정하세요.