BTK Denetim Hazırlık Çek-Listi
5651 Sayılı Kanun denetimi öncesi NAC Logger SKU'nun ürettiği kanıt zincirini operasyon ekibinin doğrulayabilmesi için tek sayfa hazırlık.
Hedef kullanıcı: Operatör / DPO / BTK denetçi sunum hazırlığı
1. Tek-tıkla denetim paketi
UI yolu: Uyum → 5651 → Kanıt Paketi Üret
API yolu:
# PDF (TR-localized, 8 bölüm; ~22 KB)
curl -H "Authorization: Bearer $JWT" \
-o evidence.pdf \
https://<host>/api/v1/tenants/me/compliance/5651/evidence-pack.pdf
# JSON envelope (9 madde)
curl -H "Authorization: Bearer $JWT" \
https://<host>/api/v1/tenants/me/compliance/5651/evidence-pack | jq
# ZIP (events + anchors + manifest + verify.md)
curl -H "Authorization: Bearer $JWT" \
-o evidence.zip \
"https://<host>/api/v1/tenants/me/logs/export?from=2026-04-20T00:00:00Z&to=2026-05-20T00:00:00Z&format=zip"
2. 9-madde envelope açıklaması
/api/v1/tenants/me/compliance/5651/evidence-pack response:
| # | Alan | Anlam |
|---|---|---|
| 1 | format_version | Şema versiyonu (mevcut: "1") |
| 2 | generated_at | Paketin üretildiği ISO 8601 UTC zaman |
| 3 | tenant_id | Pilot organizasyon UUID |
| 4 | window_from/to/days | Denetim penceresi (default 30 gün) |
| 5 | total_records | Pencerede ilgili log kaydı sayısı |
| 6 | unanchored_event_count + oldest_unanchored_at | TSA timestamp bekleyen kayıt + en eski timestamp |
| 7 | last_log_at + last_anchor_at | Pipeline son aktivite (yeşil dot health) |
| 8 | bad_days + audit_chain_anchor_ids + tsa_provider | Hatalı gün listesi + Merkle anchor zinciri + TSA tedarikçi |
| 9 | export_zip_url + verify_command_template | Operatör export URL + doğrulama cURL şablonu |
3. Health bucket — 30-gün day-by-day
GET /api/v1/tenants/me/compliance/5651/health?days=30:
{
"days": 30,
"buckets": [
{
"date": "2026-04-21",
"log_count": 12453,
"anchor_count": 288,
"unanchored_count": 0,
"error_count": 0,
"status": "healthy",
"notes": []
},
{
"date": "2026-04-22",
"log_count": 0,
"anchor_count": 0,
"status": "no_data",
"notes": ["Bu gün için 5651 log veya damga kaydı yok."]
}
]
}
Status enum:
| Status | Anlam | Denetçi bakışı |
|---|---|---|
healthy | Log + anchor + 0 hata | ✓ Kanıt zinciri tam |
degraded | Anchor gecikme veya partial gap | ⚠ İnceleme önerilir |
incident | Pipeline kesinti | ✗ Eksik kayıt — açıklama gerekir |
no_data | Aktivite yok (kapalı şube, tatil) | ℹ Bağlamsal açıklama |
Her gün için ayrı satır; incident günler BTK denetçiye "kanıt zinciri
eksik" pencereyi yasal explanation ile sunma fırsatı.
4. KamuSM / TÜBİTAK TSA timestamp
NAC anchor worker her 5 dakikada bir Merkle root üretir ve resmi TR TSA'ya RFC 3161 timestamp request gönderir:
TSA Provider: KamuSM (TÜBİTAK BİLGEM)
TSA URL: https://zd.kamusm.gov.tr/services/zaman-damgasi/zd-rest/
Protocol: RFC 3161
Anchor frequency: 5dk (288 anchor/gün)
Production wiring:
# Tenant veya global env:
NAC_TSA_PROVIDER=kamusm
# veya tenant config UI:
# Uyum → 5651 → TSA Sağlayıcı → KamuSM (TÜBİTAK BİLGEM)
Air-gapped on-prem: RFC 3161 yolu açıktır; müşteri kendi TSA sertifikası ile internal timestamp authority kullanabilir.
5. Doğrulama (verify) komut şablonu
Evidence pack'tan verify_command_template operatöre özelleşmiş cURL
şablonu sağlar:
# 1. Pack'tan anchor_id alın:
ANCHOR_ID=$(curl -sk -H "Authorization: Bearer $JWT" \
https://<host>/api/v1/tenants/me/compliance/5651/evidence-pack \
| jq -r '.audit_chain_anchor_ids[0]')
# 2. Anchor detay + Merkle proof:
curl -sk -H "Authorization: Bearer $JWT" \
https://<host>/api/v1/tenants/me/logs/verify/$ANCHOR_ID \
| jq '{merkle_root, tsa_time, tsa_certificate_sn,
included_event_count: (.events | length)}'
# 3. RFC 3161 timestamp local verify (production):
openssl ts -verify \
-in anchor_timestamp.tsr \
-CAfile kamusm_root.pem \
-data merkle_root_bytes.bin
Beklenen çıktı:
{
"merkle_root": "5c4a7e9f...",
"tsa_time": "2026-05-20T18:15:00.000Z",
"tsa_certificate_sn": "12abc...",
"included_event_count": 145
}
$ openssl ts -verify ...
Verification: OK
6. Retention policy — paket-bazlı
| Paket | Default | Gerekçe |
|---|---|---|
| Lite (kafe/perakende) | 180 gün | BTK §5/3 alt sınır (6 ay) + safety margin |
| Standard (restoran/AVM) | 365 gün | 1 yıl tipik |
| Pro (otel/şube) | 730 gün | 2 yıl 5651 üst sınır |
| On-Prem | 730 gün | Operatör override hakkı saklı |
Override: Uyum → 5651 → Saklama Politikası UI'da tenant-level override (CHECK constraint en az 90 gün; yasal alt sınır 6 ay = 180 gün).
Implementation: Schema tenants.compliance_5651_retention_days INTEGER CHECK (... >= 90). Retention worker nightly cron;
compliance_5651_events partition drop + S3/MinIO cold archive.
7. BTK denetim 8-maddelik check-list
Denetim öncesi operatörün doğrulaması gereken:
- 5651 §5/3 alt sınır 6 ay retention — UI: Saklama Politikası ≥ 180 gün
- TSA timestamp aktif — UI: TSA Sağlayıcı
KamuSMveya tenant override - Merkle chain integrity —
verify_command_templatecURL ile son anchor doğrulanmış - Health timeline 30-gün — Tüm günler
healthyveya açıklamalıno_data/degraded/incident - PDF evidence pack — Son 30 gün için PDF indirilebilir (~22 KB)
- ZIP export — Events + anchors + manifest + verify.md tamamı paket içinde
- Log source manifest — Tüm aktif log kaynakları + provider bilgisi pakete dahil
- DPO/compliance contact — Tenant config'inde DPO email tanımlı (BTK iletişim için)
8. Pilot/RFP kanıt zinciri
Bu sayfa BTK denetim hazırlığını döküman olarak sunar. Bizden bağımsız doğrulama için:
- PDF: 8-section TR-localized weasyprint render kanıtı
- JSON envelope: 9-madde sertifikalı timestamp + tenant ID
- ZIP export: ham veri + Merkle proof + verify runbook
- Per-tenant retention SQL constraint: schema-level guarantee
- KamuSM TSA preset: F2.D1 (Faz-2 §D1, 2026-05-13) shipped
- RFC 3161 round-trip: openssl ts -verify ile customer-side check
9. Akış şeması
hotspot-syslog (5651 ingest)
↓
compliance_5651_events (Postgres partition tablosu)
↓
compliance_anchor_worker (5dk batch Merkle root)
↓
KamuSM/TÜBİTAK RFC 3161 TSA timestamp
↓
audit_chain_anchor (Postgres + Merkle root + TSA stamp)
↓
MinIO/S3 archive bundle (cold storage; retention worker)
↓
cloud-console evidence-pack endpoint (PDF + JSON + ZIP)
↓
Operatör / BTK denetçi / DPO
İlgili sayfalar
- Kanıt Paketi — UI'dan tek-tık üretim
- Anchor Zinciri — Merkle root + TSA detayları
- Saklama Politikası — Paket-bazlı retention
- Log Kaynak Sağlığı — Pipeline observability