IAM); What you can do (AC); How you access resources securely across systems (OAuth)?
It's the process of determining and enforcing who can access what resources in a system.
subject (such as an individual or a process running on a computer system) can interact with an object (such as a file or hardware device)Importance: Protects sensitive information, prevents unauthorised access, and ensures compliance with regulations.
But, does it confused with Authentication?
Authentication deals with verifying the identity of a subject.
Authentication: Think of it as logging into your computer with a username and password.
Access Control: Now, once you're in, what can you do?
determines what you can access on the computer or network.
logged in doesn't mean you can access all files and applications.The four parts of access control are:
Identification - Who: is asking to access the asset?
Authentication - Can: the requestor’s identity be verified?
Authorisation - What :exactly, can the requestor access? And what can they do?
Accountability - How can actions be traced to an individual?
who has access and what systems or resources they can use. The authorisation definition process operates in this phase.
grants or rejects requests for access based on the authorisations defined in the first phase. The identification, authentication,

Access is determined by the resource owner.
How it works
E.g.
User A owns a file and allows User B to read it but denied user C to do so.

Pros
Cons
Example in practice
chmod, chown)Access rights are regulated by a central authority based on multiple levels of security.
Mechanism: Users and resources are assigned security labels. Access is granted based on these labels and policies.
SysAdmin is no longer the boss:
Characteristics: High security: Strict and non-discretionary control.
Complexity: Requires careful planning and management.
Occasionally synonymous with MLS - Multi-Level Security (Unclassified, Confidential, Secret, Top Secret)
Scenario: Emily has a "Secret" clearance and can access "Secret" documents, but not "Top Secret" ones.
Example: Military systems with classified information, e.g. Bell LaPadula
Users need the appropriate clearance level to access certain documents.owner collaboration determines access.compares subject and object labels to grant/deny access

In pairs so a quick bit of research on Mandatory Access Control (MAC) to answers in small groups or post them online.
Access is based on a set of pre-defined rules or policies, rather than roles or individual user attributes.
Provides fine-grained access control by enforcing rules that specify conditions under which access is granted or denied.
Data owners make or allow the rule.

decisions are made based on a comprehensive set of rules.conditions such as time of day, IP address, and user attributes (PAM in Linux).without manual intervention.
allows system administrators to define and manage how different applications or services authenticate users without needing to modify the applications themselves.
access control approvals on the jobs the user is assignedSimplifies administration and enhances security by grouping permissions by role rather than assigning them individually.

A set of rules that defines what actions (e.g., read, write, execute) specific users or groups can perform on system objects (like files or network devices).
Used in operating systems (like Linux) and network devices (such as routers and firewalls) to enforce access permissions.

users or groups.Multiple rules can be applied to the same resource, allowing for fine-tuned access management.setfacl -m u:username:rwx /path/to/file
permit tcp any any eq 80 : Allows HTTP traffic on port 80
ABAC decides access by checking attributes against policies. e.g.:
Access is granted or denied based on attribute evaluation (Decision Making), offering flexible and fine grained control without hard coded rules.

Failure to implement robust access control
Disclosure of sensitive information and data integrity corruptionLoss of intelligence and system and process failureattacks
One central authority manages and enforces access decisions.

Pros
Cons
Access control decisions are managed locally by teams or system owners.
Pros
It is a flexible system used to manage authentication for applications and services.
Provides a way to centralise and standardisa authentication methods, allowing the system to enforce authentication policies across different services.
Why PAM is important
Different authentication modules (e.g., password, token, biometrics) can be easily added or removed.different services (e.g., SSH, sudo) to have their own tailored authentication rules.consistent security policies and simplifies multi-factor authentication setup (MFA).
A PAM rule = Type + Flag + Module + Options
| Part | What it means | Examples |
|---|---|---|
| Type | When the rule runs | auth check identity • account login rights • password password change rules • session setup or close session |
| Control Flag | How important the rule is | required, requisite, sufficient, optional |
| Module | The plugin that performs the action | pam_unix.so, pam_tally2.so, pam_time.so |
| Options | Extra settings that change behaviour | deny=3, unlock_time=900, nullok |
Determines how PAM processes multiple modules. Flags include:
| Flag | Purpose | Example | Meaning |
|---|---|---|---|
required |
Must pass | auth required pam_unix.so |
The module must succeed; even if later ones pass, login fails if this one fails. |
requisite |
Must pass or stop | auth requisite pam_nologin.so |
If this fails, PAM stops immediately and denies access (e.g., during maintenance). |
sufficient |
One success is enough | auth sufficient pam_ssh.so |
If this succeeds, PAM skips the rest and grants access (e.g., SSH key login). |
optional |
Minimal impact | session optional pam_lastlog.so |
Used for non-critical tasks like showing the last login; failure doesn’t block access. |
Located in /etc/pam.d/
Each service has a configuration file (e.g., login, sshd).
1. auth required pam_unix.so
2. auth sufficient pam_google_authenticator.so
| Module | Control Flag | Purpose |
|---|---|---|
pam_unix.so |
required |
User must pass basic Unix password authentication. |
pam_google_authenticator.so |
sufficient |
If MFA succeeds, access is granted and PAM skips remaining modules. If MFA fails, PAM falls back to the password check. |
--- ## Others: Content-Dependent Access Control 