SECTION 1: LEARNING OBJECTIVES
By the end of this lesson, you will be able to:
-
Understand the evolution of digital identity – from passwords to self-sovereign identity.
-
Define Self-Sovereign Identity (SSI) and its implications for banking.
-
Understand Decentralised Identity (DID) and Verifiable Credentials (VCs).
-
Apply biometric and behavioural authentication in banking.
-
Understand the regulatory framework – eIDAS 2.0, GDPR, and others.
-
Measure digital identity maturity using key metrics.
-
Develop a digital identity strategy for a digital bank.
SECTION 2: THE EVOLUTION OF DIGITAL IDENTITY
2.1 Identity Evolution
| Era | Identity Model | Characteristics | Examples |
|---|---|---|---|
| Identity 1.0 | Centralised Identity | Single organisation controls identity. | Bank-issued ID, government ID. |
| Identity 2.0 | Federated Identity | Multiple organisations share identity. | Social login (Google, Facebook). |
| Identity 3.0 | User-Centric Identity | User has some control. | User-managed accounts. |
| Identity 4.0 | Self-Sovereign Identity | User owns and controls identity. | DID, Verifiable Credentials. |
2.2 The Digital Identity Spectrum
┌─────────────────────────────────────────────────────────────────────────────┐ │ DIGITAL IDENTITY SPECTRUM │ ├─────────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌──────────────────────────────────────────────────────────────────────┐ │ │ │ CENTRALISED IDENTITY │ │ │ │ Organisation controls identity. │ │ │ │ (e.g., Bank ID, Government ID) │ │ │ └──────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ v │ │ ┌──────────────────────────────────────────────────────────────────────┐ │ │ │ FEDERATED IDENTITY │ │ │ │ Multiple organisations share identity. │ │ │ │ (e.g., Social Login) │ │ │ └──────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ v │ │ ┌──────────────────────────────────────────────────────────────────────┐ │ │ │ USER-CENTRIC IDENTITY │ │ │ │ User has some control. │ │ │ │ (e.g., User-managed accounts) │ │ │ └──────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ v │ │ ┌──────────────────────────────────────────────────────────────────────┐ │ │ │ SELF-SOVEREIGN IDENTITY │ │ │ │ User owns and controls identity. │ │ │ │ (e.g., DID, Verifiable Credentials) │ │ │ └──────────────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────────┘
SECTION 3: SELF-SOVEREIGN IDENTITY (SSI)
3.1 What is Self-Sovereign Identity?
Self-Sovereign Identity (SSI) is a digital identity model where individuals have full control over their identity data. They can store, manage, and share their identity attributes without relying on centralised authorities.
Key Principles:
| Principle | Description |
|---|---|
| User Ownership | Users own and control their identity data. |
| Portability | Identity is portable across systems. |
| Interoperability | Works across different platforms. |
| Selective Disclosure | Users choose what to share. |
| Verifiability | Credentials are cryptographically verifiable. |
| Privacy | Users control their privacy. |
3.2 Decentralised Identity (DID)
| Component | Description | Example |
|---|---|---|
| DID | Decentralised Identifier. | did:example:123456789. |
| DID Document | Contains public keys and service endpoints. | JSON-LD document. |
| Verifiable Credential | Digitally signed attestation. | Proof of identity, qualification. |
| Verifier | Entity that verifies credentials. | Bank, employer. |
| Issuer | Entity that issues credentials. | Government, university. |
3.3 SSI Architecture
┌─────────────────────────────────────────────────────────────────────────────┐ │ SSI ARCHITECTURE │ ├─────────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌──────────────────────────────────────────────────────────────────────┐ │ │ │ USER (HOLDER) │ │ │ │ Owns and controls identity data │ │ │ └──────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ┌─────────────────┐ │ ┌───────────────────┐ │ │ │ ISSUER │ v │ VERIFIER │ │ │ │ (Government, │ ←─── Verifiable Credential ───│ (Bank, Employer) │ │ │ │ University) │ │ │ │ │ │ └─────────────────┘ │ └───────────────────┘ │ │ │ │ │ v │ │ ┌──────────────────────────────────────────────────────────────────────┐ │ │ │ BLOCKCHAIN / DLT │ │ │ │ (DID Registry, Verifiable Data Registry) │ │ │ └──────────────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────────┘
SECTION 4: AUTHENTICATION TECHNOLOGIES
4.1 Authentication Evolution
| Technology | Description | Security Level |
|---|---|---|
| Passwords | Knowledge-based. | Low |
| Multi-Factor Authentication | Two or more factors. | Medium |
| Biometrics | Something you are. | High |
| Behavioural Biometrics | Behaviour patterns. | High |
| Passwordless | No password required. | High |
| Decentralised Identity | User-controlled. | Very High |
4.2 Biometric Authentication
| Biometric | Description | Advantages | Limitations |
|---|---|---|---|
| Fingerprint | Unique fingerprint patterns. | Fast, convenient. | Can be faked. |
| Facial Recognition | Unique facial features. | Convenient, contactless. | Lighting, disguise. |
| Voice Recognition | Unique voice patterns. | Natural, hands-free. | Background noise. |
| Behavioural Biometrics | Behaviour patterns. | Continuous authentication. | Less accurate. |
| Iris Recognition | Unique iris patterns. | Highly accurate. | Expensive. |
4.3 Passwordless Authentication
| Method | Description | Example |
|---|---|---|
| Biometrics | Fingerprint, face, voice. | Apple Face ID. |
| FIDO2 | WebAuthn protocol. | Security keys. |
| Magic Links | One-time login links. | Email-based login. |
| SMS/Email OTP | One-time passwords. | 2FA codes. |
SECTION 5: REGULATORY FRAMEWORK
5.1 Key Regulations
| Regulation | Region | Focus |
|---|---|---|
| eIDAS 2.0 | EU | European Digital Identity (EUDI) Wallet. |
| GDPR | EU | Data protection, privacy. |
| PSD2 | EU | Strong Customer Authentication. |
| NIST SP 800-63 | US | Digital Identity Guidelines. |
| CCPA | US | Data privacy. |
5.2 eIDAS 2.0 – European Digital Identity
| Feature | Description | Impact on Banking |
|---|---|---|
| EUDI Wallet | European Digital Identity Wallet. | Digital identity for all EU citizens. |
| Interoperability | Cross-border identity verification. | Seamless KYC. |
| Privacy | User-controlled data sharing. | Consent management. |
| Verifiable Credentials | Digitally signed attestations. | Trusted identity. |
SECTION 6: IMPLEMENTATION IN PYTHON – DIGITAL IDENTITY TOOLS
# =================================================================== # MODULE 9, LESSON 7: DIGITAL IDENTITY AND SECURITY # =================================================================== import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from datetime import datetime import hashlib import json import warnings warnings.filterwarnings('ignore') print("="*70) print("DIGITAL IDENTITY AND SECURITY – THE FUTURE OF AUTHENTICATION") print("="*70) # ---------------------------------------------------------------- # PART A: DIGITAL IDENTITY MATURITY ASSESSMENT # ---------------------------------------------------------------- print("\n" + "-"*60) print("PART A: Digital Identity Maturity Assessment") print("-"*60) maturity_dimensions = { 'Identity Management': {'Current Score': 3, 'Target Score': 5, 'Priority': 'High'}, 'Authentication Technology': {'Current Score': 3, 'Target Score': 5, 'Priority': 'High'}, 'Biometrics Adoption': {'Current Score': 3, 'Target Score': 5, 'Priority': 'High'}, 'Decentralised Identity': {'Current Score': 1, 'Target Score': 4, 'Priority': 'Medium'}, 'Privacy Compliance': {'Current Score': 3, 'Target Score': 5, 'Priority': 'High'}, 'SSI Readiness': {'Current Score': 1, 'Target Score': 4, 'Priority': 'Medium'}, 'Passwordless Adoption': {'Current Score': 2, 'Target Score': 5, 'Priority': 'High'} } maturity_df = pd.DataFrame(maturity_dimensions).T print("Digital Identity Maturity Assessment:") print(maturity_df) # Visualise fig, ax = plt.subplots(figsize=(10, 6)) dimensions = list(maturity_df.index) current = maturity_df['Current Score'].tolist() target = maturity_df['Target Score'].tolist() x = np.arange(len(dimensions)) width = 0.35 ax.barh(x - width/2, current, width, label='Current', color='blue', alpha=0.7) ax.barh(x + width/2, target, width, label='Target', color='green', alpha=0.7) ax.set_yticks(x) ax.set_yticklabels(dimensions) ax.set_xlabel('Maturity Score (1-5)') ax.set_title('Digital Identity Maturity Assessment') ax.legend() ax.grid(True, alpha=0.3, axis='x') plt.tight_layout() plt.savefig('digital_identity_maturity.png', dpi=300, bbox_inches='tight') plt.show() print("Digital identity maturity visualisation saved as 'digital_identity_maturity.png'") # ---------------------------------------------------------------- # PART B: AUTHENTICATION METHODS COMPARISON # ---------------------------------------------------------------- print("\n" + "-"*60) print("PART B: Authentication Methods Comparison") print("-"*60) auth_methods = pd.DataFrame({ 'Method': ['Password', '2FA/SMS', 'Biometrics', 'Behavioural', 'Passwordless', 'Decentralised Identity'], 'Security Level (1-5)': [2, 3, 5, 4, 5, 5], 'User Experience (1-5)': [3, 4, 5, 5, 5, 4], 'Complexity (1-5)': [1, 2, 3, 4, 3, 5], 'Adoption Rate (%)': [95, 85, 75, 15, 30, 5] }) print("Authentication Methods Comparison:") print(auth_methods.to_string(index=False)) # Visualise fig, ax = plt.subplots(figsize=(10, 6)) auth_methods.set_index('Method')[['Security Level (1-5)', 'User Experience (1-5)']].plot(kind='bar', ax=ax) ax.set_ylabel('Score (1-5)') ax.set_title('Authentication Methods: Security vs User Experience') ax.legend(loc='best') ax.grid(True, alpha=0.3) plt.tight_layout() plt.savefig('auth_methods.png', dpi=300, bbox_inches='tight') plt.show() print("Authentication methods visualisation saved as 'auth_methods.png'") # ---------------------------------------------------------------- # PART C: SIMULATED VERIFIABLE CREDENTIAL # ---------------------------------------------------------------- print("\n" + "-"*60) print("PART C: Simulated Verifiable Credential") print("-"*60) class VerifiableCredential: """Simulate a verifiable credential for digital identity.""" def __init__(self, issuer, subject, claims): self.issuer = issuer self.subject = subject self.claims = claims self.id = f"vc_{hashlib.md5(json.dumps(claims).encode()).hexdigest()[:8]}" self.issued = datetime.now().isoformat() self.expiry = (datetime.now() + timedelta(days=365)).isoformat() self.signature = self._sign() def _sign(self): """Simulate signing the credential.""" data = f"{self.issuer}{self.subject}{json.dumps(self.claims)}{self.issued}" return hashlib.sha256(data.encode()).hexdigest()[:16] def verify(self): """Verify the credential.""" expected = self._sign() return self.signature == expected def to_json(self): """Convert to JSON.""" return { 'id': self.id, 'issuer': self.issuer, 'subject': self.subject, 'claims': self.claims, 'issued': self.issued, 'expiry': self.expiry, 'signature': self.signature } # Test verifiable credential vc = VerifiableCredential( issuer='Government of Example', subject='Customer_12345', claims={ 'name': 'John Doe', 'date_of_birth': '1985-03-15', 'nationality': 'Country X', 'verified': True } ) print("Verifiable Credential:") print(json.dumps(vc.to_json(), indent=2)) print(f"\nVerification: {'✅ Valid' if vc.verify() else '❌ Invalid'}") # ---------------------------------------------------------------- # PART D: BIOMETRIC AUTHENTICATION SIMULATION # ---------------------------------------------------------------- print("\n" + "-"*60) print("PART D: Biometric Authentication Simulation") print("-"*60) class BiometricAuthenticator: """Simulate biometric authentication.""" def __init__(self): self.enrolled = {} self.attempts = [] def enroll(self, user_id, biometric_template): """Enrol a user with biometric data.""" self.enrolled[user_id] = biometric_template return {'status': 'Enrolled', 'user': user_id} def authenticate(self, user_id, biometric_sample): """Authenticate using biometrics.""" if user_id not in self.enrolled: return {'status': 'Error', 'message': 'User not enrolled'} # Simulate matching match_score = np.random.uniform(0.85, 0.99) is_match = match_score > 0.90 attempt = { 'user': user_id, 'match_score': match_score, 'is_match': is_match, 'timestamp': datetime.now().isoformat() } self.attempts.append(attempt) return { 'status': 'Success' if is_match else 'Failed', 'match_score': match_score, 'user': user_id } def get_stats(self): """Get authentication statistics.""" total = len(self.attempts) if total == 0: return {'total_attempts': 0} successes = sum(1 for a in self.attempts if a['is_match']) return { 'total_attempts': total, 'success_rate': successes / total, 'average_score': np.mean([a['match_score'] for a in self.attempts]) } # Test biometric authentication biometric = BiometricAuthenticator() # Enrol users biometric.enroll('CUST001', {'fingerprint': 'fp_template_001'}) biometric.enroll('CUST002', {'fingerprint': 'fp_template_002'}) # Authenticate result1 = biometric.authenticate('CUST001', {'fingerprint': 'fp_sample_001'}) result2 = biometric.authenticate('CUST002', {'fingerprint': 'fp_sample_002'}) print("Biometric Authentication Results:") print(f" User 1: {result1['status']} (Score: {result1['match_score']:.3f})") print(f" User 2: {result2['status']} (Score: {result2['match_score']:.3f})") stats = biometric.get_stats() print(f"\nAuthentication Statistics:") print(f" Total Attempts: {stats['total_attempts']}") print(f" Success Rate: {stats['success_rate']:.2%}") print(f" Average Score: {stats['average_score']:.3f}") # ---------------------------------------------------------------- # PART E: DIGITAL IDENTITY METRICS # ---------------------------------------------------------------- print("\n" + "-"*60) print("PART E: Digital Identity Metrics Dashboard") print("-"*60) identity_metrics = pd.DataFrame({ 'Metric': [ 'Passwordless Adoption', 'Biometrics Adoption', 'MFA Adoption', 'Identity Verification Time', 'Fraud Detection Rate', 'Identity Theft Incidents', 'Digital Identity Maturity', 'Privacy Compliance' ], 'Current Value': [ '15%', '45%', '78%', '8.5 min', '95%', '12/year', '2.8/5', '85%' ], 'Target Value': [ '> 80%', '> 90%', '> 95%', '< 2 min', '> 99%', '0/year', '> 4.5/5', '> 95%' ], 'Status': ['🔴', '🟡', '🟡', '🔴', '🟡', '🟡', '🟡', '🟡'] }) print("Digital Identity Metrics Dashboard:") print(identity_metrics.to_string(index=False)) # ---------------------------------------------------------------- # PART F: DIGITAL IDENTITY ROADMAP # ---------------------------------------------------------------- print("\n" + "-"*60) print("PART F: Digital Identity Roadmap") print("-"*60) roadmap = { "Phase 1 (0-12 months) – Foundation": { "Focus": "Build digital identity foundation.", "Activities": [ "Implement passwordless authentication.", "Expand biometrics adoption.", "Assess SSI readiness.", "Comply with eIDAS 2.0 requirements." ], "Success Metrics": ["Passwordless adoption > 30%", "Biometrics adoption > 60%"] }, "Phase 2 (12-24 months) – Scale": { "Focus": "Scale digital identity capabilities.", "Activities": [ "Implement SSI and DID.", "Launch verifiable credentials.", "Scale passwordless adoption.", "Build identity ecosystem." ], "Success Metrics": ["Passwordless adoption > 60%", "SSI implementation"] }, "Phase 3 (24-36 months) – Advanced": { "Focus": "Advanced digital identity.", "Activities": [ "Achieve passwordless adoption > 80%.", "Implement advanced biometrics.", "Build global identity capabilities.", "Lead in digital identity innovation." ], "Success Metrics": ["Passwordless adoption > 80%", "Industry-leading identity"] }, "Phase 4 (36+ months) – Leadership": { "Focus": "Industry-leading digital identity.", "Activities": [ "Lead digital identity innovation.", "Build global identity ecosystem.", "Achieve industry leadership.", "Continuous improvement." ], "Success Metrics": ["Industry-leading digital identity", "Continuous innovation"] } } for phase, details in roadmap.items(): print(f"\n{phase}:") print(f" Focus: {details['Focus']}") print(" Activities:") for activity in details['Activities']: print(f" • {activity}") print(" Success Metrics:") for metric in details['Success Metrics']: print(f" • {metric}") # ---------------------------------------------------------------- # PART G: SUMMARY AND RECOMMENDATIONS # ---------------------------------------------------------------- print("\n" + "="*70) print("PART G: Summary and Recommendations") print("="*70) print(""" Digital Identity and Security – Key Takeaways: 1. Digital identity is evolving from centralised to self-sovereign identity. 2. SSI gives users ownership and control of their identity data. 3. DID and Verifiable Credentials enable decentralised, verifiable identity. 4. Biometric and behavioural authentication provide high security. 5. Passwordless authentication improves security and user experience. 6. Regulatory framework: eIDAS 2.0, GDPR, PSD2, NIST. 7. Key metrics: passwordless adoption, biometrics adoption, fraud detection. Recommendations: - Implement passwordless authentication. - Expand biometrics adoption. - Assess SSI readiness and plan for implementation. - Comply with eIDAS 2.0 and privacy regulations. - Build a digital identity ecosystem. - Continuously innovate in identity and authentication. """) print("="*70) print("END OF LESSON 7 – MODULE 9") print("="*70)
SECTION 8: SUMMARY FOR THE DATA PRACTITIONER
-
Digital identity is evolving from centralised to self-sovereign identity (SSI).
-
SSI gives users ownership and control of their identity data, with portability, interoperability, and selective disclosure.
-
DID (Decentralised Identifier) and Verifiable Credentials enable decentralised, cryptographically verifiable identity.
-
Biometric authentication (fingerprint, facial recognition, voice, behavioural) provides high security.
-
Passwordless authentication improves both security and user experience.
-
Regulatory framework includes eIDAS 2.0 (EU), GDPR, PSD2 (SCA), and NIST guidelines.
-
Key metrics include passwordless adoption, biometrics adoption, MFA adoption, identity verification time, and fraud detection rate.
SECTION 9: RECOMMENDED NEXT STEPS
-
Implement passwordless authentication.
-
Expand biometrics adoption.
-
Assess SSI readiness and plan for implementation.
-
Comply with eIDAS 2.0 and privacy regulations.
-
Build a digital identity ecosystem.
-
Continuously innovate in identity and authentication.
-
Prepare for Lesson 8: Preparing for the Future – Strategic Foresight and Organisational Agility.
[END OF LESSON 7 – MODULE 9]