Access Control
Access Control
Control
Access Control
• Access control is a security mechanism that determines who or what
can access specific resources in a system and what actions they can
perform.
• It’s all about managing permissions to protect data and prevent
unauthorized access — crucial for both software development and
network security.
Types of Access Control:
1. Discretionary Access Control (DAC)
The owner of a resource decides who gets access.
Example: File permissions in Windows, where you can choose who can
read, write, or execute your files.
2. Mandatory Access Control (MAC)
Access is controlled by strict policies defined by the system, not the
user.
Example: Military or government systems with classified information.
Types of Access Control:
3. Role-Based Access Control (RBAC)
Access is granted based on the user's role (like Admin, User, or
Guest).Example: In a web app, only admins can delete users, while
regular users can only view data.
4. Attribute-Based Access Control (ABAC)
Access is based on attributes of the user, resource, or environment.
Example: A healthcare system might allow access to patient records
only during office hours and only for authorized doctors.
5. Rule-Based Access Control
Why Access Control is Important
Security: Prevent unauthorized access to sensitive data.
Integrity: Ensure data isn’t modified in unintended ways.
Confidentiality: Restrict access to confidential information.
Maintainability: Keep code organized and reduce accidental
interference.
Discretionary Access Control (DAC)
• Discretionary Access Control (DAC) is a type of access control where the
owner of a resource decides who can access it and what they can do with
it. It’s called "discretionary" because access is granted at the owner’s
discretion.
• Key Characteristics of DAC:
Owner-Controlled: The owner of a file, folder, or object can assign
permissions.
Flexible but Risky: Users can share access, which makes it flexible but may
introduce security risks if not carefully managed.
Identity-Based: Access decisions are based on user identities and their
assigned permissions.
Discretionary Access Control (DAC)
if ($userRole == "admin")
{ echo "Access granted!"; }
else
{ echo "Access denied!"; }
• Drawbacks of DAC:
Less Secure: Users might accidentally (or intentionally) give
access to malicious users.
No Centralized Control: Security depends on individual owners,
not a system-wide policy.