Çok Faktörlü Kimlik Doğrulama ve Hesap Kurtarma
MFA ile kimlik doğrulamayı parolaların ötesinde güçlendirin ve korumalarınızı aşan bir arka kapıya dönüşmeyecek güvenli hesap kurtarma akışları tasarlayın.
Çok Faktörlü Kimlik Doğrulama ve Hesap Kurtarma, CoddyKit'te ücretsiz bir Secure Coding & OWASP Top 10 for Backend dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Secure Coding & OWASP Top 10 for Backend öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Secure Coding & OWASP Top 10 for Backend kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Beyond the Password
Strong access control and good session management still rest on one assumption: the user is who they claim. Passwords alone are weak. Multi-factor authentication adds layers so a stolen password is not enough.
The Three Factors
Authentication factors fall into categories:
- Something you know — password, PIN
- Something you have — phone, hardware key
- Something you are — fingerprint, face
MFA combines two or more different categories.
TOTP Authenticator Apps
Time-based One-Time Passwords generate a 6-digit code from a shared secret and the current time. The server computes the same code to verify.
import pyotp
totp = pyotp.TOTP(user_secret)
is_valid = totp.verify(submitted_code)Why SMS Is Weaker
SMS codes are better than nothing but vulnerable to SIM swapping and interception. Prefer TOTP apps or hardware keys; reserve SMS as a last-resort option.
Hardware Keys and WebAuthn
WebAuthn uses public-key cryptography with a hardware or platform authenticator. There is no shared secret to phish — the strongest widely available MFA.
Backup Codes
What if a user loses their phone? Issue one-time backup codes at enrollment. Store them hashed, just like passwords, and invalidate each after use.
stored = hash(backup_code)
# on use: verify then mark consumedRecovery Is an Attack Surface
Account recovery often bypasses MFA. If recovery only needs an email link, an attacker who controls the inbox owns the account. Recovery must be as strong as login.
Secure Recovery Tokens
Recovery links should use a high-entropy, single-use, short-lived token, stored hashed and invalidated on use or password change.
token = secrets.token_urlsafe(32)
store(hash(token), expires_in=900) # 15 minutesAvoid Recovery Pitfalls
- Do not reveal whether an email exists (enumeration)
- Rate-limit recovery requests
- Notify the user when recovery is initiated
- Require re-enrollment of MFA after a full reset
Step-Up Authentication
For sensitive actions — changing email, large transfers — require a fresh factor even within an active session. This step-up limits the damage of a hijacked session.
Rate-Limiting the MFA Step
The MFA code entry is itself a target. A six-digit code has only a million possibilities, so without limits an attacker can brute-force it. Rate-limit and lock out after a few wrong codes, and expire each code quickly.
Quick Check
Test your MFA and recovery knowledge.
Recap
You strengthened authentication:
- MFA combines factors from different categories
- Prefer TOTP and WebAuthn over SMS
- Provide hashed backup codes
- Make recovery as strong as login with single-use, expiring tokens
- Use step-up auth for sensitive actions
Sıkça Sorulan Sorular
“Çok Faktörlü Kimlik Doğrulama ve Hesap Kurtarma” dersi ücretsiz mi?
Evet — “Çok Faktörlü Kimlik Doğrulama ve Hesap Kurtarma” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Secure Coding & OWASP Top 10 for Backend kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Secure Coding & OWASP Top 10 for Backend kursu toplamda 4 dersten oluşur.
“Çok Faktörlü Kimlik Doğrulama ve Hesap Kurtarma” dersinde ne öğreneceğim?
MFA ile kimlik doğrulamayı parolaların ötesinde güçlendirin ve korumalarınızı aşan bir arka kapıya dönüşmeyecek güvenli hesap kurtarma akışları tasarlayın. Secure Coding & OWASP Top 10 for Backend ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Secure Coding & OWASP Top 10 for Backend öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Secure Coding & OWASP Top 10 for Backend, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.
“Çok Faktörlü Kimlik Doğrulama ve Hesap Kurtarma” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Secure Coding & OWASP Top 10 for Backend dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Secure Coding & OWASP Top 10 for Backend dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Güçlü Erişim Denetimini Uygulama
- Güvenli Kullanıcı Kimlik Doğrulama Mekanizmaları
- Oturum Yönetimi için En İyi Uygulamalar
- Çok Faktörlü Kimlik Doğrulama ve Hesap Kurtarma