21 Access Control Knowledge Check
Test Your Understanding and Challenge Exercises
21.1 Learning Objectives
This chapter helps you:
- Test your understanding of advanced access control concepts
- Practice analyzing security scenarios
- Apply knowledge to real-world IoT security challenges
- Explore advanced implementation challenges
21.2 Knowledge Check: Token Lifecycle
21.3 Knowledge Check: API Keys vs Tokens
21.4 Knowledge Check: Session Idle Timeout
21.7 Knowledge Check: Constrained Device Authentication
21.8 Knowledge Check: AAA Accounting Layer
21.9 Knowledge Check: Privilege Escalation Prevention
21.10 Challenge Exercises
Challenge 1: Implement Capability Delegation
Add the ability for users with the GRANT capability to temporarily delegate a subset of their capabilities to another user:
- Create a delegation token with source and target user IDs
- Delegated capabilities cannot exceed the grantor’s current capabilities
- Delegation expires when the grantor’s session ends
- Log all delegation events for audit trail
Challenge 2: Add Attribute-Based Conditions
Extend the access control system with attribute-based conditions:
- Device location (indoor/outdoor/restricted area)
- Network connection type (WiFi/cellular/wired)
- Device health status (normal/degraded/compromised)
- Combine multiple attributes using AND/OR logic
Challenge 3: Implement Separation of Duties
For critical operations (firmware update, user deletion), require approval from two different administrators:
- First admin initiates the operation
- System waits for second admin approval (different user)
- Both approvals must occur within a time window
- Either admin can cancel the pending operation
- Log the full approval chain
Challenge 4: Add Token Binding
Implement token binding to prevent token theft:
- Bind tokens to device fingerprint (MAC address, hardware ID)
- Validate binding on every token use
- Alert on binding mismatch (possible token theft)
- Allow secure token migration with re-binding
21.11 Expected Outcomes
After completing these knowledge checks and challenges, you should be able to:
| Concept | Demonstration | Real-World Application |
|---|---|---|
| Capability Flags | Fine-grained permission checking with bit operations | Linux file permissions, AWS IAM policies |
| Token Lifecycle | Issue, validate, refresh, revoke tokens | OAuth 2.0, JWT tokens |
| Session Management | Time-limited sessions with idle detection | Web applications, enterprise systems |
| Privilege Escalation Prevention | Detect and block unauthorized capability expansion | Unix sudo, Windows UAC |
| Time-Based Access | Restrict access to specific hours | Business hours policies, maintenance windows |
| Audit Logging | Complete security event trail | SIEM systems, compliance requirements |
21.12 Summary
These knowledge checks test critical security concepts:
- Token Lifecycle: Understanding refresh limits, expiration, and validity windows
- Credential Security: API keys vs tokens, hardcoding risks, secure storage
- Session Management: Idle timeouts vs maximum duration, walk-away attack prevention
- OAuth Flows: Device Authorization Grant for input-constrained IoT devices
- AAA Framework: Distinguishing authentication, authorization, and accounting
- Privilege Management: Escalation detection, capability boundaries
21.13 What’s Next
After completing these challenges, you have mastered enterprise-grade access control patterns. You can:
- Return to Capability-Based Access Control to review concepts
- Review the Full Implementation to see how it all works together
- Return to Authentication Concepts to review the AAA framework
- Return to Fundamentals Lab to see how far you’ve come
Or return to the Advanced Access Control Lab Overview.