1387  Security Concepts and Challenge Exercises

1387.1 Security Concepts Demonstrated

Concept Implementation Real-World Application
Token-Based Auth RFID card IDs matched against database Physical access cards, API keys, JWT tokens
Role-Based Access Control GUEST < USER < ADMIN hierarchy Corporate access levels, AWS IAM roles
Account Lockout 60s lockout after 3 failures, escalating Windows account lockout, banking apps
Disabled Accounts Active flag checked during authentication Employee offboarding, compromised accounts
Constant-Time Compare XOR comparison prevents timing attacks Secure password validation, crypto libraries
Audit Logging Complete event trail with timestamps SIEM systems, compliance logging
Separation of Concerns Authentication separate from Authorization OAuth 2.0 (AuthN) vs resource permissions (AuthZ)
Defense in Depth Multiple checks: valid card, active account, sufficient level Enterprise security architecture
Visual Security Feedback LEDs indicate system state Security cameras, alarm panels
Escalating Lockouts Longer lockouts for repeated failures Google account protection

1387.2 Challenge Exercises

TipChallenge 1: Add Time-Based Access Control

Modify the system so certain zones are only accessible during “business hours” (simulate with a time window). Requirements: - Server Room: Only accessible 9 AM - 5 PM - After hours, even admins need a special override code - Log all after-hours access attempts

TipChallenge 2: Implement Two-Person Rule

For high-security zones (Control Center), require two different admin cards within 30 seconds: 1. First admin presents card 2. System prompts “Waiting for second administrator…” 3. Second admin presents different card within time limit 4. Both must be admin level 5. If timeout or same card, deny access

TipChallenge 3: Add Temporary Access Passes

Implement visitor passes with expiration: - Create a new ACCESS_VISITOR level - Visitor cards expire after a set time (e.g., 8 hours from first use) - Track first-use timestamp per card - Automatically disable expired passes

TipChallenge 4: Implement Anti-Passback

Prevent “tailgating” by tracking entry/exit: - Users must exit a zone before re-entering - If card used for entry without previous exit, deny access - Track current zone for each user - Alert on anti-passback violations

TipChallenge 5: Add Emergency Override

Implement an emergency mode for fire/evacuation: - Special “EMERGENCY” command unlocks all doors - All access restrictions temporarily disabled - Heavily logged with alert - Auto-reverts after 10 minutes or manual reset - Requires special admin confirmation


1387.3 What’s Next

After completing these challenge exercises, continue to:

Or return to the Authentication and Access Control Overview.