Subject: Software Architectures
Identity Access Management for SSO and MFA Integration
To provide secure, seamless identity and access management through Single Sign-On (SSO) and Multi-Factor Authentication (MFA) capabilities, enabling organizations to protect their digital assets while delivering excellent user experience.
The utility tree prioritizes quality attributes based on business importance and technical risk. Each scenario is rated with two priorities: (Business Importance, Technical Difficulty).
| Quality Attribute | Refinement | Scenario | Priority (H/M/L) |
|---|---|---|---|
| Security | Confidentiality | User credentials and tokens must be encrypted in transit and at rest, preventing unauthorized access even if network traffic is intercepted | (H, H) |
| Authentication | System must detect and block brute force attacks within 5 failed attempts, locking account for 15 minutes | (H, M) | |
| Authorization | Access policies must be evaluated in < 50ms for every request, with no authorization bypass possible | (H, M) | |
| Performance | Response Time | Authentication requests must complete within 2 seconds under normal load (1000 concurrent users) | (H, M) |
| Throughput | System must handle 10,000 authentication requests per second during peak hours | (H, H) | |
| Availability | Fault Tolerance | Authentication service must remain operational even if one availability zone fails, with automatic failover < 30 seconds | (H, H) |
| Recoverability | System must recover from database failure within 4 hours with no data loss | (M, H) | |
| Scalability | Load Handling | System must scale horizontally to support 50% increase in users within 10 minutes | (M, M) |
| Data Volume | Support up to 1 million user accounts with no performance degradation | (M, M) | |
| Modifiability | Extensibility | Add new authentication provider within 2 developer-days without modifying core authentication logic | (M, L) |
| Configurability | Modify authentication policies through configuration without code deployment | (M, L) | |
| Usability | User Experience | New users can complete MFA enrollment within 3 minutes with 90% success rate | (M, L) |
Quality Attribute: Protect credentials and tokens from unauthorized access
Tactics Applied:
Result: Even if database is compromised, credentials remain protected; intercepted traffic is unreadable
Quality Attribute: Handle 10,000 authentication requests per second
Tactics Applied:
Result: Linear scalability; system handles peak loads by adding instances
Quality Attribute: Automatic failover on availability zone failure
Tactics Applied:
Result: Zero user-visible downtime during zone failures; automatic recovery in < 30 seconds
Quality Attribute: Authentication completes within 2 seconds
Tactics Applied:
Result: 95th percentile response time < 1.5 seconds; cache hit rate > 85%
Quality Attribute: Protect against brute force attacks
Tactics Applied:
Result: Brute force attacks blocked within 5 attempts; legitimate users minimally impacted
The context diagram shows the IAM system boundaries, external actors, and key integrations.
Context Diagram - System Boundaries and External Interactions
The module view shows the logical organization of the system into layers and components.
Module Decomposition Diagram - Logical Component Organization
The component and connector view shows runtime interactions, data flows, and communication patterns.
Component and Connector Diagram - Runtime Data Flow
The deployment view shows the physical infrastructure, network topology, and deployment configuration.
Deployment Diagram - Physical Infrastructure and Network Topology
User navigates to application (e.g., Salesforce). Application redirects to IAM login page with SAML/OAuth request.
User enters username/password. Auth Service validates credentials against User DB (bcrypt hash comparison). Risk assessment performed based on IP, device, location.
If risk score exceeds threshold or policy requires MFA, system sends challenge (SMS/Email/Push). User receives one-time code or push notification.
User enters code or approves push. Auth Service validates MFA response. Time-based validation with 30-second window.
Upon successful authentication, Session Service creates session, generates JWT access token (15 min) and refresh token (7 days). Session stored in Redis cache.
Federation Service generates SAML assertion or OAuth authorization code. User redirected back to application with authentication response.
Application exchanges authorization code for access token via back-channel call. Validates token signature and claims.
User clicks on another app in portal. Session Service checks existing session in Redis. If valid, generates new app-specific token without re-authentication.
Application makes API calls with access token. API Gateway validates token, Session Service checks session status. Policy Engine evaluates authorization rules.
Session extended on user activity (sliding expiration). Background job cleans expired sessions. Forced logout possible via admin console.
All authentication events logged asynchronously to Audit DB. Real-time monitoring detects anomalies (impossible travel, brute force). Security team alerted on suspicious activity.
Security quality attribute drives most architectural decisions in IAM systems. Defense-in-depth approach with multiple layers (encryption, authentication, authorization, audit) is essential. Zero Trust model requires continuous verification rather than perimeter-based security.
Strong security measures (MFA, encryption, authorization checks) add latency. Strategic caching mitigates this but introduces consistency challenges. Token-based authentication balances security and performance by reducing database lookups.
Decomposing IAM into focused services (Auth, User, Session, Policy) enables independent scaling and deployment. Each service can use optimal technology stack. Fault isolation prevents cascading failures.
Authentication failures can result from many causes. Comprehensive logging, metrics, and tracing are essential for troubleshooting. Audit trails are not just for compliance—they enable security analysis and anomaly detection.
Distributed caching and multi-region deployment introduce consistency issues. Deleted users may temporarily authenticate via cache. Session revocation requires cache invalidation across all regions. Design for eventual consistency with acceptable windows.
Stateless service design enables easy horizontal scaling. Externalizing session state to Redis allows any instance to handle any request. Auto-scaling based on authentication rate handles traffic spikes (Monday mornings, product launches).
Multi-AZ deployment eliminates single points of failure. Active-active configuration provides instant failover. Database replication and backup strategies are critical for disaster recovery. Trade-off: increased infrastructure cost.
Adopting industry standards (SAML, OAuth, OIDC, SCIM) simplifies integration with SaaS applications. Pre-built connectors reduce implementation time. Standards ensure interoperability and avoid vendor lock-in.
Layered architecture (Presentation, API, Service, Data) isolates changes. Adding new authentication method doesn't affect authorization logic. Configuration-driven behavior reduces code changes for policy updates.
Strong security can frustrate users if not implemented thoughtfully. Risk-based MFA only prompts when necessary. Remember device reduces friction. SSO significantly improves productivity by eliminating repeated logins.
Non-critical operations (audit logging, notifications, analytics) use message queues. Decouples services and improves responsiveness. Failed messages can be retried without impacting user experience.
Regulations (GDPR, SOC2, HIPAA) mandate specific capabilities: audit trails, data encryption, access controls, data retention. Designing for compliance from the start avoids costly retrofits. Regular security audits validate architectural decisions.
Building an enterprise IAM system requires balancing competing quality attributes. No single architecture pattern solves all problems—successful systems combine tactics strategically based on priorities. The utility tree methodology helps identify and prioritize ASRs, ensuring architectural effort focuses on high-impact scenarios. Understanding trade-offs (e.g., consistency vs. availability, security vs. usability) is essential for making informed architectural decisions.