Implementing Risk-Based Authentication

1. Understanding Risk Scoring

ConceptDetail
Risk scoreNumeric (0-100) reflecting login risk
InputsDevice, location, behavior, threat intel
OutputAllow / step-up / deny

2. Implementing Login Context Analysis

SignalDetail
New device+ risk
New country+ risk
Impossible travel+ + risk (e.g., NYC → Tokyo in 1h)
Anonymous network+ risk

3. Using Anomaly Detection

ApproachDetail
StatisticalZ-score from user's baseline
ClusteringDBSCAN/Isolation Forest
Time seriesCompare login pattern to history

4. Implementing Machine Learning Risk Models

ModelDetail
Gradient boostingXGBoost/LightGBM on tabular features
NeuralSequence models for behavioral patterns
TrainingLabels from fraud confirmations
DriftMonitor + retrain

5. Using Adaptive Authentication

Risk LevelAuth Required
LowPassword only
Medium+ device-bound prompt
High+ phishing-resistant MFA (passkey/FIDO2)
CriticalBlock + manual review

6. Implementing Risk Thresholds

Example: Decision table

function decide(score) {
  if (score < 20)  return "allow";
  if (score < 50)  return "step_up_otp";
  if (score < 80)  return "step_up_webauthn";
  return "deny";
}

7. Handling Step-Up Authentication Triggers

TriggerAction
Sensitive actionPrompt MFA before allowing
Risk rise mid-sessionRe-auth within timeout
amr / acr claimRequired for action

8. Using Continuous Authentication

Background risk reassessment during session; trigger step-up on suspicious activity. See section 50.

9. Implementing Threat Intelligence Integration

FeedDetail
HIBPHave I Been Pwned credential check
Stolen sessionsBotnet IP feeds
Phishing kitsIndicator sharing (STIX/TAXII)
SSFShared Signals Framework — RISC/CAEP events

10. Logging Risk Events

FieldDetail
user_id, scoreAlways
factorsList of contributing signals
decisionallow / step_up / deny
outcomeSuccess / failure feedback