Unit 3
Unit 3
access control (RBAC) and discretionary access control (DAC)-Access control lists (ACLs)-Identity management
systems-Secure authentication protocols: Kerberos, OAuth, SAML-Federation and identity federation
Authentication:
Authentication is the process of verifying the identity of a user or system to ensure that they
are who they claim to be.
It is a critical step in securing systems, applications, and sensitive data.
Authentication ensures that only authorized users can access resources, preventing
unauthorized access.
Methods of Authentication :
Authentication is the process of validating a user’s identity to ensure that only authorized individuals
gain access to systems, applications, or sensitive data. The three primary methods of authentication
are:
Types of Passwords:
Static Passwords: These are fixed and remain unchanged until the user resets them.
Dynamic Passwords: These are temporary and expire after a single use or a specific
time frame, such as One-Time Passwords (OTPs).
Use strong passwords with a mix of letters, numbers, and special characters.
Regularly update passwords to minimize the risk of compromise.
Apply password hashing and salting to protect stored passwords from attacks.
Advantages :
Types of Tokens:
Physical Tokens: Tangible devices such as key cards, USB security keys (e.g., YubiKey), or
smart cards that are used to authenticate the user.
Digital Tokens:
o Session Tokens: Temporary tokens issued upon login to maintain a user session.
o One-Time Passwords (OTPs): Short-lived passwords sent via SMS, email, or
generated by apps like Google Authenticator.
o API Tokens: Tokens used for authenticating programmatic access in systems like
OAuth or JWTs.
Advantages :
Disadvantages :
Physical Biometrics:
o Fingerprints: Unique ridges and patterns on a user’s finger are scanned and
matched against stored templates.
o Facial Recognition: Identifies distinctive facial features, such as the distance
between eyes or jawline shape.
o Iris or Retina Scans: Uses patterns in the eye for high-accuracy verification.
Behavioral Biometrics:
o Voice Recognition: Analyzes unique vocal characteristics such as pitch and
rhythm.
o Keystroke Dynamics: Tracks typing speed and patterns to verify identity.
Advantages:
Disadvantages:
Cost: Requires specialized hardware for scanning and verification, such as fingerprint
readers or cameras.
Environmental Challenges: Factors like wet fingers, poor lighting, or background
noise can affect accuracy.
Irreversible Breaches: Biometric data, if stolen, cannot be reset or changed like a
password.
Single Sign-On (SSO) is an authentication method that simplifies access by allowing users to
log in once and gain entry to multiple connected applications or services using a single set of
credentials, such as a username and password. It uses a central identity provider to
authenticate users, after which they can navigate seamlessly between systems without
needing to log in again. This approach enhances user experience and productivity by
eliminating the need to remember multiple passwords for different services while also
centralizing authentication management.
Key Features:
A user logs into their Google account once and gains access to services like Gmail, Google
Drive, YouTube, and Calendar without re-entering their credentials.
By integrating SSO, organizations can provide a smoother user experience while maintaining
centralized control over authentication and access. However, it must be secured to prevent
single-point vulnerabilities.
Multi-Factor Authentication:
Key Features:
Enhanced Security: Adds multiple verification layers to ensure only authorized users
gain access.
Diverse Factors: Combines knowledge (passwords), possession (tokens or OTPs), and
inherence (biometrics).
Risk Mitigation: Protects against threats like phishing, password compromise, or
credential theft.
Example:
When logging into an online banking account, the user enters their password (something
they know) and verifies their identity using an OTP sent to their mobile device (something
they have).
MFA is widely used in sensitive applications like online banking, corporate systems, and
government services to enhance security. Although it may require extra steps during
authentication, it significantly improves protection against unauthorized access.
Roles Based Access Control :
Role-Based Access Control (RBAC) is a security mechanism that restricts system access
based on roles assigned to users within an organization. A role represents a set of permissions
defining what actions a user can perform or resources they can access. Instead of assigning
permissions directly to users, RBAC assigns them to roles, which are then assigned to users.
This simplifies management, enhances security, and ensures consistency in access control.
1. Define Roles:
Organizations create roles based on job functions (e.g., Administrator, Manager,
Employee). Each role is associated with specific permissions.
2. Assign Permissions to Roles:
Permissions for accessing resources, performing actions, or executing tasks are
linked to roles rather than individual users.
3. Assign Users to Roles:
Users are assigned roles based on their responsibilities. A user can have one or
multiple roles depending on their job requirements.
4. Enforce Access Control:
When a user attempts to access a system or resource, their role is verified, and only
the permitted actions are allowed.
Example:
Benefits of RBAC:
1. Improved Security: Reduces the risk of unauthorized access by clearly defining roles
and permissions.
2. Operational Efficiency: Simplifies management and reduces the administrative
overhead of managing individual permissions.
3. Compliance Support: Aligns with data protection and privacy regulations by ensuring
proper access control.
4. Flexibility: Easily adapts to organizational changes, such as restructuring or role
modifications.
RBAC is widely used in industries such as healthcare, finance, and IT, where secure and
efficient access management is critical. By implementing RBAC, organizations can maintain
control over sensitive resources while ensuring that users have the access necessary to
perform their duties.
Discretionary Access Control (DAC)
Discretionary Access Control (DAC) is a security model that allows the owner of a resource
(such as a file, application, or system) to determine who can access it and what actions they
can perform. In DAC, the resource owner has the discretion to grant or revoke access rights,
making the control of access highly flexible but also potentially more vulnerable to misuse. It
is typically used in environments where access management needs to be dynamic and easily
adjustable by resource owners.
1. Resource Ownership:
In DAC, each resource, such as files or data, is owned by a specific user. The owner
has control over who can access the resource.
2. Access Control Lists (ACLs):
Access to resources is defined using Access Control Lists (ACLs), where each entry
specifies which users or groups have what level of access (e.g., read, write, execute)
to a particular resource.
3. Granting Permissions:
The owner can grant permissions to other users or groups to perform actions on the
resource. For example, the owner might grant read access to a colleague or write
access to a supervisor.
4. Revoking Permissions:
The owner can also revoke or modify access permissions at any time, offering
flexibility in managing access.
Resource Owner: The individual who owns the resource and controls access.
Users: Individuals who are granted access to resources by the owner.
Permissions: Actions a user is allowed to perform on a resource (e.g., read, write,
execute).
Access Control Lists (ACLs): Lists that specify the users and their associated
permissions for each resource.
Features of DAC:
Flexible Access Control: The owner has full discretion to define who can access their
resources and to what extent.
User-Level Control: Allows for easy management of access by individual users, which
is beneficial in smaller or dynamic environments.
Decentralized Management: Each user manages access to their own resources
without a centralized authority.
Example:
Benefits of DAC:
1. Flexibility: Resource owners have the freedom to manage access based on their
needs without centralized oversight.
2. User Autonomy: Users can control access to their own files and resources, offering
ease of management.
3. Simple to Implement: In smaller or less complex environments, DAC is easy to set up
and maintain.
Drawbacks of DAC:
1. Security Risks: Since resource owners can grant access to anyone, the system is
vulnerable to unauthorized access if the owner grants permissions carelessly.
2. Inconsistent Control: Lack of central oversight means access permissions can
become fragmented or mismanaged.
3. Difficulty in Auditing: Tracking who has access to what resources can be challenging,
leading to potential compliance or security issues.
Use Cases:
DAC is commonly used in smaller, less sensitive environments where flexibility and ease of
access control are prioritized over stringent security. It is often found in personal computing,
file systems, or environments where users manage their own access to resources. For
example, in a shared folder system, a user may control who can access their files and what
actions they can perform on them.
In contrast to models like Role-Based Access Control (RBAC), which centralizes the
management of access, DAC places greater trust and responsibility in the hands of the
resource owner, which can be both an advantage and a potential security concern.
Access Control Lists (ACLs)
An Access Control List (ACL) is a list of permissions attached to an object (such as a file,
folder, network resource, or application) that specifies which users or systems can access
the object and what actions they can perform on it. ACLs define the rules or access rights
that apply to each object, allowing for fine-grained control over who can read, write, or
execute a resource.
How ACLs Work:
1. Object: The resource (e.g., file, directory, network device) to which access needs to
be controlled.
2. Subject: The user or group trying to access the resource.
3. Permissions: The actions (e.g., read, write, execute) granted to the subject by the
ACL for the specific object.
4. Enforcement: When a user attempts to access the object, the system checks the ACL
to determine if the user has the necessary permissions.
Types of ACLs:
1. File System ACLs: Used in operating systems (e.g., Windows or Unix/Linux) to control
access to files and directories. Each file or directory has its own ACL listing who can
access it and with what permissions.
o Example: In a Linux system, file permissions (read, write, execute) are assigned to
users and groups through ACLs.
2. Network ACLs: Used to control traffic in and out of a network. Common in firewalls,
routers, and switches to permit or deny specific IP addresses, protocols, or ports.
o Example: A router might have an ACL to allow traffic only from specific IP addresses
while blocking others.
3. Directory Service ACLs: Common in environments using directory services like Active
Directory. These ACLs specify which users or groups can access and modify directory
objects like user accounts or organizational units.
Components of an ACL:
1. Subject (User/Group): Specifies the user or group for which the permissions are
granted or denied.
2. Permissions: The type of access granted, such as read, write, execute, or delete.
3. Access Control Entry (ACE): An entry in the ACL that specifies a subject and their
associated permissions for an object. Each ACL consists of one or more ACEs.
o Example ACE:
User: Alice
Permissions: Read, Write
Object: File1.txt
Access Type: Allow
4. Allow or Deny: Permissions can either allow or deny access. For example, a user may
be allowed to read a file but denied permission to modify it.
Example of ACL in a File System:
In this case:
Benefits of ACLs:
1. Flexibility: ACLs provide precise control over resource access by enabling different
permissions for different users and groups.
2. Security: By restricting access to sensitive data, ACLs help protect against
unauthorized access and data breaches.
3. Simplified Access Management: ACLs centralize access control to resources, making
it easier to manage and audit permissions.
Challenges of ACLs:
File Systems: Controlling who can access specific files or directories in an operating
system.
Networking: Configuring firewalls and routers to control which network traffic is
allowed or blocked.
Directory Services: Managing access to objects in directory services like Active
Directory.
Cloud Services: In cloud computing, ACLs are used to manage access to cloud
resources such as storage buckets, virtual machines, and databases.
Access Control Lists (ACLs) are a powerful tool for managing and enforcing security policies
on resources by providing detailed and flexible access control mechanisms. They are widely
used across various systems, from operating systems and networks to cloud platforms,
helping organizations secure sensitive resources while maintaining ease of access for
authorized users.
2. Authentication:
o Verifying the identity of a user or system to ensure they are who they claim to be.
This can be done via different methods, including passwords, multi-factor
authentication (MFA), and biometrics.
3. Authorization:
o Once authenticated, an IMS ensures that users have the appropriate access to
resources and services based on their roles, permissions, and policies. This is often
enforced using systems like Role-Based Access Control (RBAC) or Attribute-Based
Access Control (ABAC).
4. User Directory:
o A central repository, often a Directory Service like LDAP (Lightweight Directory
Access Protocol) or Active Directory, which stores user profiles, attributes, and roles.
It enables administrators to manage access and ensure proper user lifecycle
management.
5. Provisioning and De-provisioning:
o Provisioning: The process of granting access to resources when a new user is
onboarded (e.g., creating email accounts, assigning roles).
o De-provisioning: The process of removing a user's access when they leave the
organization or no longer need it.
8. Password Management:
o Tools and protocols to ensure strong, secure password policies (e.g., password
complexity requirements, expiration policies) and provide self-service password
reset options.
1. User Enrollment:
When a new employee or user joins the system, their identity is created in the user
directory. This may involve manual entry by an administrator or a self-registration
process.
2. Authentication:
When the user tries to access the system, they authenticate by entering their
credentials (e.g., username and password, biometric scan). If the authentication
process is successful, they are granted access.
3. Authorization:
Once authenticated, the system checks the user’s roles or permissions to determine
what resources or actions they are authorized to access. The IMS enforces access
control policies to ensure only authorized users can access specific data or services.
4. Access Control Enforcement:
The IMS uses RBAC or other models like ABAC (Attribute-Based Access Control) to
enforce granular access control, ensuring that only authorized users can access
specific systems or perform certain tasks.
5. Auditing and Reporting:
The system continuously monitors and logs user activity. Administrators can audit
logs to ensure compliance, investigate suspicious activities, and track the
performance of access control policies.
6. Provisioning and De-provisioning:
When users join, roles and permissions are assigned to them based on their job
functions. When users leave or change roles, access is updated or revoked
accordingly to prevent unauthorized access.
Key Features of an Identity Management System:
1. Improved Security:
o Ensures that only authorized individuals can access sensitive data or systems. Multi-
factor authentication (MFA) and secure password policies further enhance security.
4. Operational Efficiency:
o Streamlines user provisioning and de-provisioning, reducing administrative overhead
and ensuring timely access for employees.
5. Cost Savings:
o Reduces IT workload by enabling self-service password resets, role-based access
control, and automatic user management processes.
1. Complexity in Setup:
o Integrating IMS with existing systems, applications, and infrastructure can be
complex, particularly in larger organizations.
2. User Adoption:
o Users may face resistance when new authentication methods (like multi-factor
authentication) or access control processes are introduced.
3. Scalability Issues:
o As the number of users grows, managing and securing the identities can become a
challenge without a robust, scalable solution.
4. Maintenance:
o Regular maintenance and updates are required to keep the system secure and up-
to-date with emerging security threats and compliance regulations.
These protocols are critical in ensuring that communication between users and systems
remains secure, preventing identity theft, man-in-the-middle attacks, and other types of
security breaches.
1. Kerberos
Kerberos is a network authentication protocol designed to provide secure authentication for
users and services over an insecure network, like the internet. It uses symmetric key
cryptography and a trusted third-party service called the Key Distribution Center (KDC) to
authenticate users and provide encrypted communication.
2. Authentication Process:
o Step 1: A user logs in by entering their username and password. The
password is used to generate a symmetric key that is shared with the KDC.
o Step 2: The client sends a request to the AS for a TGT. The AS verifies the
user’s credentials and issues a TGT encrypted with the user’s password-
derived key.
o Step 3: The client sends the TGT to the TGS to request access to a particular
service.
o Step 4: The TGS checks the TGT and issues a Service Ticket for the requested
service, which is encrypted using the service’s secret key.
o Step 5: The client sends the Service Ticket to the service, which decrypts it
and grants access.
Benefits of Kerberos:
Strong Security: Uses symmetric encryption and ensures that user credentials are
never transmitted over the network.
Single Sign-On (SSO): Once authenticated, users can access multiple services without
re-authenticating.
Efficient: Reduces the need for continuous credential verification during a user
session.
Challenges:
3. OAuth
OAuth (Open Authorization) is an open standard for authorization, not
authentication, used to grant third-party applications limited access to resources on
a server without exposing user credentials. OAuth is widely used in scenarios where
a user needs to provide third-party applications access to their data stored on
another service (e.g., social media or cloud storage services).
The general flow of OAuth 2.0 (the most widely used version) is as follows:
1. Step 1: The user logs into the Authorization Server and grants permission for a third-
party application to access their resources (e.g., post on their behalf on social
media).
2. Step 2: The Client (third-party app) redirects the user to the Authorization Server for
authentication and authorization.
3. Step 3: If the user grants permission, the Authorization Server issues an Access
Token.
4. Step 4: The client uses the Access Token to request resources from the Resource
Server.
5. Step 5: The Resource Server verifies the Access Token and provides the requested
resources to the Client.
Benefits of OAuth:
Secure: Allows users to grant limited access without sharing passwords with third-
party services.
Scalable: Suitable for web and mobile applications, enabling access to a wide range
of third-party APIs and services.
Revocable: Access tokens can be revoked by the user at any time, providing fine-
grained control over permissions.
Challenges:
1. Roles in SAML:
o Identity Provider (IdP): The entity that authenticates users (e.g., corporate
directory service).
o Service Provider (SP): The application or service that relies on the IdP to
authenticate users (e.g., cloud services).
o User: The entity that requests access to the service.
2. Authentication Flow:
o Step 1: The user attempts to access a service (SP). The service redirects the
user to the IdP for authentication.
o Step 2: The IdP authenticates the user, typically via a password or other
authentication mechanisms (e.g., MFA).
o Step 3: Once authenticated, the IdP sends a SAML Assertion (a secure token)
to the SP, containing information about the user's identity and authorization.
o Step 4: The SP processes the SAML Assertion, verifies its validity, and grants
access to the user.
Benefits of SAML:
Single Sign-On (SSO): Users can log in once and access multiple services.
Federated Identity Management: Allows users to authenticate across different
organizations without creating separate credentials for each one.
Security: SAML provides secure and encrypted authentication data using digital
signatures and encryption techniques.
Challenges:
Identity federation enables users to authenticate once and gain access to multiple systems,
typically across organizational boundaries, without needing separate credentials for each. It
leverages trust relationships between different identity providers (IdPs) and service
providers (SPs) to allow secure access to services.
1. Federation
Federation, in a broader sense, refers to the process of creating a unified system or
structure by linking together various smaller systems, entities, or organizations. It can apply
to areas like federated learning, federated networks, and federated databases, where
different components or systems come together to work as one cohesive entity without
losing their independence.
2. Identity Federation
Identity Federation is a process where multiple identity systems (or organizations) establish
a trust relationship to share identity information about users across domains. This allows
users to authenticate in one domain (e.g., one organization) and gain access to resources in
another domain or service provider without needing to create a new account or log in again.
In simple terms, Identity Federation allows users to use their identity from one domain or
system (called the Identity Provider or IdP) to access services or applications in another
system (called the Service Provider or SP).
1. User Convenience:
Users only need to remember one set of credentials, which improves the user
experience and reduces login fatigue.
2. Cost-Efficiency:
Organizations do not need to manage separate accounts and credentials for each
user across multiple systems, reducing the operational cost of account management.
3. Enhanced Security:
Federated systems typically rely on stronger, centralized identity management
protocols and practices, reducing the risk of password fatigue and poor security
practices (e.g., weak passwords).
4. Scalability:
Identity Federation enables organizations to extend services to external users
(partners, customers) without requiring them to create and manage new accounts.
Imagine a scenario where a user has accounts in two different organizations: Company A
and Company B. Both companies participate in a federated identity system.
The user can log in once with their credentials from Company A and then access
resources hosted by Company B without needing to log in again.
This federation allows for streamlined access across different organizations' systems
while maintaining a high level of security and reducing the number of credentials a
user must manage.
Identity Federation is an essential concept for enabling seamless access across different
services and domains, improving both security and user experience. By allowing users to
authenticate once and access multiple services, it reduces the complexity of managing
multiple accounts and credentials, benefiting both users and organizations.