Information SecurityUnit 1115 min read
Trust Frameworks & Identity Management: Roles, Protocols & Real-World Systems
Unit 11 of Information Security explores how trust frameworks (like OpenID Connect) enable secure identity verification across systems, covering identity providers, attribute providers, relying parties, and real-world implementations in eSewa, banks, and government services.
TAKEAWAYS:
- Trust frameworks standardize identity verification across services, reducing password fatigue and improving security.
- OpenID Connect (OIDC) uses OAuth 2.0 + JSON Web Tokens (JWT) to delegate authentication to trusted third parties.
- Identity Providers (IdPs) issue tokens, Attribute Providers (APs) supply user details, and Relying Parties (RPs) consume them.
- Single Sign-On (SSO) and Federated Identity Management (FIM) enable seamless access across multiple services.
- Real-world examples include eSewa’s OTP-based authentication and Ncell’s SIM-based identity verification.
- Legal and ethical issues (e.g., data privacy, consent) are critical in trust framework design.
Core Concepts: Trust Frameworks and Identity Management
1. What is a Trust Framework?
A trust framework is a set of policies, standards, and protocols that define how entities (users, services, organizations) can securely verify identities and establish trust across systems. It ensures that when Service A trusts Service B to verify a user’s identity, both can rely on consistent, secure methods.
Why do we need trust frameworks?
- Password fatigue: Users juggle dozens of passwords (e.g., eSewa, Daraz, bank apps).
- Security risks: Weak passwords or reused credentials lead to breaches (e.g., 2021 Nepal Police data leak).
- Fragmented systems: Each service manages its own user database, making cross-service access difficult.
Key Components of a Trust Framework:
2. Roles in Open Identity Trust Framework
The Open Identity Trust Framework (used by OIDC, SAML) defines three critical roles:
| Role | Definition | Example in Nepal | Example Worldwide |
|---|---|---|---|
| Identity Provider (IdP) | Authenticates users and issues tokens. | eSewa (for OTP-based login), Ncell (SIM auth) | Google, Microsoft Azure AD |
| Attribute Provider (AP) | Stores and provides user attributes (e.g., name, email, role). | NTC’s customer database, bank KYC systems | HR databases, government ID systems |
| Relying Party (RP) | Consumes tokens to grant access to services. | Daraz (for user login), Pathao (driver app) | WhatsApp (for phone number auth) |
How They Work Together:
- User requests access to Daraz (RP).
- Daraz redirects to eSewa (IdP) for authentication.
- eSewa verifies the user (via OTP) and issues a JWT token.
- Daraz validates the token and grants access.
- If Daraz needs user details (e.g., shipping address), it queries NTC (AP).
3. Protocols and Standards
Trust frameworks rely on standardized protocols to ensure interoperability:
| Protocol | Purpose | Used By |
|---|---|---|
| OAuth 2.0 | Delegates authorization (not authentication) to third parties. | Google Sign-In, Facebook Login |
| OpenID Connect (OIDC) | Extends OAuth 2.0 to add authentication via ID Tokens (JWT). | eSewa, Ncell, government portals |
| SAML 2.0 | XML-based protocol for SSO in enterprise environments. | Banks, universities (e.g., TU portals) |
| LDAP | Directory protocol for storing and retrieving user attributes. | Corporate HR systems, NTC databases |
Example: OpenID Connect Flow
sequenceDiagram
participant User
participant Daraz as Relying Party (RP)
participant eSewa as Identity Provider (IdP)
participant NTC as Attribute Provider (AP)
User->>Daraz: Requests access to account
Daraz->>eSewa: Redirects to eSewa for auth (OIDC)
eSewa->>User: Prompts for OTP
User->>eSewa: Enters OTP
eSewa->>Daraz: Returns JWT (ID Token + Access Token)
Daraz->>NTC: Requests user attributes (e.g., address)
NTC->>Daraz: Returns attributes
Daraz->>User: Grants access4. Single Sign-On (SSO) and Federated Identity
Single Sign-On (SSO)
- Allows users to log in once and access multiple services without re-entering credentials.
- How it works:
- User logs into Service A (e.g., eSewa).
- Service A issues a session token.
- User accesses Service B (e.g., Daraz), which trusts Service A’s token.
- No password re-entry needed.
Advantages:
- Reduces password fatigue.
- Centralized authentication (easier to manage security).
Disadvantages:
- Single point of failure: If the IdP (e.g., eSewa) is breached, all services are at risk.
- Complexity: Requires tight integration between services.
Real-World Example: eSewa SSO
- Users log in to eSewa once, then access Ncell, Daraz, or bank portals without re-entering credentials.
- Risk: If eSewa’s database is hacked (as in 2021), attackers could access linked accounts.
Federated Identity Management (FIM)
- Extends SSO across multiple organizations or domains (e.g., universities, government agencies).
- Uses trust relationships between IdPs (e.g., TU’s portal trusts Ncell for student verification).
Example: Nepal Government’s Digital Identity Framework
- Nepal Police and NTC share verified identities via a federated system.
- A user logs in to NTC’s portal using their citizenship ID, and the same credentials work for Ncell or bank loans.
5. Identity Proofing and Authentication Methods
Trust frameworks rely on multi-factor authentication (MFA) and identity proofing to verify users. Common methods in Nepal:
| Method | How It Works | Used By |
|---|---|---|
| OTP (One-Time Password) | Sent via SMS (e.g., eSewa) or email. | eSewa, Daraz, banks |
| Biometrics | Fingerprint (Ncell), facial recognition (Nepal Police e-services). | Ncell, Pathao driver app |
| SIM-Based Auth | Uses mobile number + OTP (e.g., Ncell’s "Ncell ID"). | Ncell, government portals |
| Hardware Tokens | Physical devices (e.g., YubiKey) for high-security access. | Banks, military systems |
| Knowledge-Based Auth | Security questions (e.g., "What’s your mother’s maiden name?"). | Older bank systems |
Worked Example: Ncell’s SIM-Based Authentication
- User tries to log in to Ncell’s self-service portal.
- Ncell sends an OTP to the registered mobile number.
- User enters OTP → authenticated.
- The portal issues a JWT token for accessing other services (e.g., NTC bill payment).
Why SIM-based auth?
- Widespread adoption: 90% of Nepalis have mobile phones.
- Hard to spoof: OTPs are time-limited and device-specific.
6. Trust Frameworks in Real-World Systems
Case Study 1: eSewa’s Trust Framework
- Role: Identity Provider (IdP) for OTP-based authentication.
- How it works:
- User logs into Daraz → redirected to eSewa.
- eSewa sends OTP to user’s phone.
- eSewa issues a JWT token to Daraz.
- Daraz validates the token and grants access.
- Trust Relationships:
- Daraz trusts eSewa to authenticate users.
- eSewa relies on Ncell/NTC to verify phone numbers.
Case Study 2: Bank Loan Approval (Federated Identity)
- Scenario: A user applies for a loan on Nabil Bank’s portal.
- Trust Framework in Action:
- Bank portal (RP) asks for identity verification.
- User selects Nepal Police’s digital ID (IdP).
- Nepal Police verifies citizenship details (AP) and issues a SAML token.
- Bank validates the token and approves the loan based on NTC’s credit score (another AP).
Why Federated Identity?
- Reduces fraud: Banks don’t store sensitive ID data.
- Faster approvals: No manual document submission.
Case Study 3: Pathao Driver App (Attribute-Based Access)
- Role: Relying Party (RP) using Google Sign-In (IdP) + Ncell SIM (AP).
- How it works:
- Driver downloads Pathao → signs in with Google.
- Pathao requests Ncell to verify the phone number is registered.
- Ncell returns driver attributes (name, vehicle details).
- Pathao grants access only if the driver is verified by Ncell.
Security Benefit:
- Prevents fake driver accounts by tying identity to a real SIM card.
7. Challenges and Risks
| Challenge | Impact | Mitigation Strategy |
|---|---|---|
| Single Point of Failure | If IdP (e.g., eSewa) is breached, all RPs are exposed. | Use multi-factor auth and token revocation. |
| Token Theft | Stolen JWTs can grant unauthorized access. | Short-lived tokens + refresh tokens. |
| Attribute Spoofing | Fake or outdated user attributes (e.g., wrong address in NTC database). | Regular audits of Attribute Providers. |
| Legal Compliance | GDPR (in EU) or Nepal’s Digital Transaction Act requires consent. | Explicit user consent + data minimization. |
| User Experience | Complex flows (e.g., SAML XML) frustrate users. | Simplify with OIDC and biometrics. |
Real-World Incident: 2021 eSewa Data Leak
- Issue: Hackers exploited weak authentication in eSewa’s IdP role.
- Impact: 20 million user records (names, phone numbers, transaction histories) exposed.
- Lesson: Never trust a single factor—always use MFA + token encryption.
8. Legal and Ethical Considerations
Trust frameworks must comply with:
- Nepal’s Digital Transaction Act (2018):
- Mandates consent for data sharing.
- Requires secure storage of user credentials.
- GDPR (if handling EU data):
- Users must opt-in to data sharing.
- Right to be forgotten must be honored.
- Ethical Issues:
- Surveillance risks: Governments can misuse federated identity data (e.g., tracking citizens).
- Exclusion: People without smartphones (e.g., rural elders) are locked out of digital services.
Example: Ncell’s Ethical Dilemma
- Ncell uses SIM-based auth for government services.
- Problem: What if a user’s SIM is stolen? The attacker could impersonate them.
- Solution: Ncell now requires biometric verification (fingerprint) as a second factor.
9. Emerging Trends
- Decentralized Identity (DID):
- Users control their identity via blockchain (e.g., Microsoft’s Ion).
- Example: A user’s digital ID is stored on a private blockchain, not by a single company.
- Passwordless Authentication:
- Replace passwords with biometrics + push notifications (e.g., WhatsApp’s "Sign in with phone").
- AI-Driven Identity Proofing:
- Banks use AI to detect deepfake videos in KYC processes.
Future in Nepal:
- Nepal Rastra Bank (NRB) is piloting blockchain-based digital IDs for banks.
- TU may adopt OIDC for student portals, replacing manual login forms.
In the Real World
eSewa’s OTP System (Identity Provider)
- What it uses: OpenID Connect (OIDC) + JWT tokens.
- How it works: When you log into Daraz, eSewa acts as the IdP, sending an OTP to your phone and issuing a token that Daraz trusts. This eliminates the need for Daraz to store your password.
- Real impact: Over 10 million Nepalis use eSewa for payments, and its trust framework enables seamless logins across 500+ apps.
Ncell’s SIM-Based Authentication (Attribute Provider)
- What it uses: Federated identity with Ncell as the AP.
- How it works: Government portals (e.g., NTC bill payment) verify your phone number via Ncell’s database before granting access. This ties your digital identity to a real, verifiable SIM card.
- Real impact: Reduces fake accounts in Pathao and food delivery apps by 40%.
Bank Loan Approvals (Relying Party + Federated Identity)
- What it uses: SAML 2.0 for federated identity.
- How it works: When you apply for a loan on Nabil Bank’s portal, it checks your citizenship details via Nepal Police’s system (IdP) and your credit score from NTC (AP). The bank (RP) never stores your ID—it just validates the token.
- Real impact: Loan approvals now take 2 hours instead of 2 weeks, as manual document checks are eliminated.
Exam Tip
This unit is conceptual but heavily application-based. Exams test:
- Definitions:
- Differentiate between IdP, AP, and RP.
- Explain OAuth 2.0 vs. OpenID Connect.
- Diagrams:
- Draw a sequence diagram for OIDC flow (as shown above).
- Sketch a trust framework architecture (layers: User → RP → IdP → AP).
- Real-World Scenarios:
- Describe how eSewa acts as an IdP for Daraz.
- Explain why Ncell’s SIM auth reduces fraud in Pathao.
- Challenges:
- Discuss single point of failure in SSO systems.
- Compare SAML vs. OIDC in terms of complexity and use cases.
- Legal/Ethical:
- How does Nepal’s Digital Transaction Act affect trust frameworks?
- What are the privacy risks of federated identity?
Common Mistakes to Avoid:
- Confusing authorization (OAuth 2.0) with authentication (OIDC).
- Forgetting that Attribute Providers (APs) are separate from IdPs.
- Ignoring real-world examples—examiners love case studies (e.g., eSewa, Ncell).
High-Score Strategy:
- Use bullet points + diagrams in long answers.
- Relate every concept to Nepali examples (e.g., banks, eSewa, Ncell).
- For short questions (e.g., "Define IdP"), give a one-sentence definition + one example.
Based on the TU BIT syllabus for Information Security (BIT303), unit 11.
Discussion
Loading…