0
0
Blockchain / Solidityprogramming~5 mins

Access control patterns in Blockchain / Solidity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Access Control in blockchain?
Access Control in blockchain means deciding who can do what actions on the blockchain, like reading data or making changes. It helps keep the system safe by allowing only trusted users to perform certain tasks.
Click to reveal answer
beginner
Explain the Role-Based Access Control (RBAC) pattern.
RBAC gives permissions to users based on their roles. For example, an 'admin' role can add or remove users, while a 'viewer' role can only see data. This makes managing permissions easier and clearer.
Click to reveal answer
intermediate
What is the Attribute-Based Access Control (ABAC) pattern?
ABAC controls access by checking user attributes like age, location, or membership status. It uses rules that combine these attributes to decide if someone can do an action.
Click to reveal answer
intermediate
Describe the Capability-Based Access Control pattern.
This pattern gives users special tokens or 'capabilities' that prove they have permission to do certain actions. If a user has the right token, they can perform the action without checking roles or attributes every time.
Click to reveal answer
beginner
Why is Access Control important in smart contracts?
Smart contracts run automatically and control valuable assets. Access control ensures only authorized users can trigger sensitive functions, preventing theft or mistakes.
Click to reveal answer
Which access control pattern assigns permissions based on user roles?
ARole-Based Access Control (RBAC)
BAttribute-Based Access Control (ABAC)
CCapability-Based Access Control
DDiscretionary Access Control
In ABAC, access decisions are made based on:
AUser attributes and rules
BTokens or capabilities
CUser roles only
DFixed permissions
What does Capability-Based Access Control use to grant permissions?
AUser attributes
BSpecial tokens or capabilities
CUser roles
DPasswords
Why is access control critical in smart contracts?
ATo speed up transactions
BTo allow anyone to change contract code
CTo restrict sensitive actions to authorized users
DTo increase blockchain size
Which pattern is best when permissions depend on multiple user details like location and membership?
AMandatory Access Control
BRBAC
CCapability-Based
DABAC
Describe the main differences between RBAC and ABAC in blockchain access control.
Think about how permissions are decided in each pattern.
You got /3 concepts.
    Explain why access control is essential for smart contracts and give an example of a risk without it.
    Consider what could happen if anyone could call any function.
    You got /3 concepts.