0% found this document useful (0 votes)
13 views25 pages

UNIT 4 Identification and Authentication

The document outlines various authentication methods and security measures in distributed systems, emphasizing the importance of verifying user identities to protect sensitive data. It details methods such as password-based authentication, multi-factor authentication, and biometric authentication, along with preventive measures against password guessing and social engineering attacks. Additionally, it discusses the significance of establishing a secure environment for user authentication and access control to enhance overall system security.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views25 pages

UNIT 4 Identification and Authentication

The document outlines various authentication methods and security measures in distributed systems, emphasizing the importance of verifying user identities to protect sensitive data. It details methods such as password-based authentication, multi-factor authentication, and biometric authentication, along with preventive measures against password guessing and social engineering attacks. Additionally, it discusses the significance of establishing a secure environment for user authentication and access control to enhance overall system security.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

UNIT4 Identification and Authentication 9 Hrs.

Username and password – bootstrapping password


protection – guessing passwords – social engineering
attacks – phishing countermeasures - spoofing – attacks
on password entry – attacking on password storage -
protecting the password file – single sign-on

1.Username and password


What is Authentication in Disrtibuted Systems?
Authentication in distributed systems refers to the process of verifying
the identity of users, devices, or services seeking access to resources or
services within a network that spans multiple computers or locations. In
such systems, entities often interact over a network without being
physically co-located, making it crucial to establish trust and verify
identities reliably.
Importance of Authentication in Distributed System
Authentication is vital in distributed systems to ensure that only
authorized users, devices, and services can access and interact with the
system's resources. Here are key reasons why authentication is
important:
 Security: Protects sensitive data and resources from unauthorized
access and potential breaches.
 Trust: Establishes trust between different components and users in
the system, ensuring that interactions are legitimate.
 Accountability: Tracks user activities, providing a way to audit and
attribute actions to specific entities.
 Access Control: Enables precise control over who can access which
parts of the system, enhancing overall security.
 Compliance: Helps meet regulatory and compliance requirements
by ensuring proper user identification and access management.
Authentication Methods in Distributed Systems
Below are the main Authentication methods in Distributed Systems:
1. Password-based authentication

Also known as knowledge-based authentication, password-based


authentication relies on a username and password or PIN. This is the most
common authentication method; anyone who has logged in to a computer
knows how to use a password.

Password-based authentication is the easiest authentication type for


adversaries to abuse. People often reuse passwords and create guessable
passwords with dictionary words and publicly available personal info.
Further, employees need a password for every application and device they
use, making them difficult to remember and leading employees to simplify
passwords wherever possible. This leaves accounts vulnerable to phishing
and brute-force attacks.

Companies should create password policies restricting password reuse.


Password policies can also require users to change passwords regularly
and require password complexity, such as meeting a certain length and
using special characters.
2. Tokens
Tokens are temporary credentials generated by the system that users can
use to access resources. They often have a limited lifespan and can be
revoked if needed.
OAuth tokens used in APIs to authenticate and authorize third-party
applications.
Use Case: Frequently used in RESTful APIs and microservices
architectures to manage authentication and authorization. Tokens
provide a more secure alternative to session-based authentication,
allowing stateless and scalable interactions. They are also used in Single
Sign-On (SSO) solutions.
3. Multi-Factor Authentication (MFA)
MFA requires users to provide two or more ve
rification factors to gain access. This could be something they know
(password), something they have (a mobile phone), or something they
are (fingerprint).
A user logging into a corporate VPN using a password and a one-time code
sent to their mobile device.
Use Case: Enhances security for critical systems like financial services,
healthcare, and enterprise environments by requiring multiple forms of
verification, reducing the risk of unauthorized access even if one factor is
compromised. It's particularly useful for systems handling sensitive or
valuable data.
4. Public Key Infrastructure (PKI)
PKI uses pairs of cryptographic keys (public and private) for secure
communication and authentication. Digital certificates issued by a
Certificate Authority (CA) verify the identity of entities.
SSL/TLS certificates used in securing communications between web
browsers and servers.
Use Case: Essential for securing communications in distributed systems,
such as in e-commerce transactions and secure email communications.
PKI provides strong encryption and authentication based on digital
certificates, ensuring that data
transmitted between parties remains confidential and unaltered.
5.Biometric authentication
Biometrics uses something the user is. It relies less on an easily stolen
secret to verify users own an account. Biometric identifiers are unique,
making it more difficult to hack accounts using them.

Common types of biometrics include the following:


 Fingerprint scanning verifies authentication based on a user's
fingerprints.
 Palm scanning identifies users by examining their unique vein
patterns.
 Facial recognition uses the person's facial characteristics for
verification.
 Iris recognition scans the user's eye with infrared to compare
patterns against a saved profile.
 Behavioral biometrics uses how a person walks, types or handles a
device.
6. Federated Identity Management
Federated identity management allows users to use a single set of
credentials to access multiple applications across different domains. This
is often implemented through protocols like SAML, OAuth2, or OpenID
Connect.
Single Sign-On (SSO) services like SAML or OAuth2 used across multiple
applications and organizations.
Use Case: Useful in environments where users need access to multiple
systems or services without having to authenticate separately for each
one. Common in enterprise settings and collaborations between
organizations, federated identity management simplifies user access and
improves security by centralizing authentication.
7. Smart Cards
Smart cards are physical cards embedded with a microprocessor that can
store and process data. They are often used in conjunction with a PIN for
two-factor authentication.
Employee access cards used to log into workstations and access secure
areas within a corporate office.
Use Case: Often used in corporate and government settings for physical
and logical access control, combining something the user has (the card)
with something they know (a PIN). Smart cards enhance security by
storing cryptographic keys and certificates that are used for secure
authentication.
8. Passwordless Authentication
Passwordless authentication eliminates the need for traditional
passwords by using alternatives like magic links, biometrics, or hardware
tokens. This method improves security and user experience by reducing
the reliance on passwords.
Magic links sent to a user's email for logging into an account without a
password.
Use Case: Enhances user experience and security by eliminating the need
for passwords, reducing the risk of password-related attacks such as
phishing and credential stuffing. Common in modern web applications
and services, passwordless authentication is increasingly adopted for its
convenience and security benefits.
9.Single sign-on

Single sign-on (SSO) enables an employee to use a single set of credentials


to access multiple applications or websites. The user has an account with
an identity provider (IdP) that is a trusted source for the application
(service provider). The service provider doesn't save the password. The
IdP tells the site or application via cookies or tokens that the user verified
through it.

SSO reduces how many credentials a user needs to remember,


strengthening security. UX is also improved as users don't have to log in to
each account each time they access it, provided they recently authenticated
to the IdP. SSO can also help reduce a help desk's time assisting with
password issues.

This authentication method does mean that, if an IdP suffers a data breach,
attackers could gain access to multiple accounts with a single set of
credentials. SSO also requires an initial heavy time investment for IT to set
up and connect to its various applications and websites
2.Bootstrapping password protection
Bootstrapping password protection in a distributed system involves
establishing a secure and trusted environment where users can
authenticate themselves and access resources securely. Here's a detailed
explanation with a real-time example:

Key Concepts:

1. Authentication: Verifying the identity of users or entities trying to


access the system.
2. Authorization: Ensuring that authenticated users have the
appropriate permissions to access specific resources.
3. Secure Communication: Encrypting data exchanged between nodes
to prevent eavesdropping and tampering.
4. Trust Establishment: Building a foundation of trust among nodes in
the distributed system.

Steps for Bootstrapping Password Protection:

1. Initial Setup:
o Define a central authority (e.g., a Key Distribution Center)
responsible for managing user credentials and issuing
authentication tokens.
o Distribute initial credentials securely to all nodes in the system.
2. User Authentication:
o Implement a secure login mechanism where users provide
their credentials (e.g., username and password).
o Use cryptographic techniques (e.g., hashing and salting) to
store and verify passwords securely.
3. Token Issuance:
o Upon successful authentication, issue a secure token (e.g., a
session token or ticket) that the user can use for subsequent
access.
o Ensure the token is encrypted and has a limited validity period.
4. Secure Communication:
o Use protocols like SSL/TLS to encrypt communication between
nodes and clients.
o Implement mutual authentication to ensure both parties are
verified.
5. Access Control:
oDefine access control policies to determine which resources
users can access based on their roles and permissions.
o Use role-based access control (RBAC) or attribute-based access
control (ABAC) for fine-grained access management.
6. Periodic Re-authentication:
o Implement periodic re-authentication to ensure ongoing
security.
o Require users to re-enter their credentials or refresh their
tokens at regular intervals.

Real-Time Example: Implementing Bootstrapping Password


Protection in a Distributed System

Scenario:

Imagine a distributed system with multiple nodes (servers) and users who
need to access resources on these servers securely.

Steps:

1. Initial Setup:
o Establish a Key Distribution Center (KDC) that will manage
user credentials and issue authentication tokens.
o Distribute initial credentials (e.g., public keys) securely to all
nodes in the system.
2. User Authentication:
o Implement a secure login mechanism where users provide
their username and password.
o Store passwords securely using hashing and salting techniques.
3. Token Issuance:
o Upon successful authentication, the KDC issues a session token
encrypted with the user's public key.
o The token includes a session key for secure communication and
has a limited validity period.
4. Secure Communication:
o Use SSL/TLS to encrypt communication between nodes and
clients.
o Implement mutual authentication to ensure both parties are
verified.
5. Access Control:
o Define access control policies based on user roles and
permissions.
o Use RBAC or ABAC for fine-grained access management.
6. Periodic Re-authentication:
o Require users to re-enter their credentials or refresh their
tokens at regular intervals to ensure ongoing security.

3.Guessing passwords
Guessing passwords, often referred to as password cracking, is the process
of attempting to gain unauthorized access to a system by systematically
entering different password combinations. This can be done through
various methods, such as brute force attacks, dictionary attacks, and social
engineering. Here's a detailed explanation with real-time examples:

### Types of Password Guessing Attacks:

1. **Brute Force Attack**:

- This method involves trying all possible password combinations until


the correct one is found.

- **Example**: An attacker uses automated tools to try every possible


combination of characters for a password until they gain access. This
method can be time-consuming and is often mitigated by implementing
account lockout policies after a certain number of failed attempts.

2. **Dictionary Attack**:

- In this method, attackers use a precompiled list of common passwords


and phrases (a "dictionary") to guess the password.

- **Example**: An attacker uses a list of commonly used passwords, such


as "password", "123456", "qwerty", etc., to attempt to gain access to an
account.
3. **Rainbow Table Attack**:

- This attack uses precomputed hash values of common passwords to find


matches with hashed passwords in a system.

- **Example**: An attacker uses a rainbow table, which contains


precomputed hash values of possible passwords, to compare against the
hashed passwords stored in a system's database.

4. **Phishing**:

- This social engineering attack involves tricking users into providing


their passwords through fraudulent means, such as fake websites or
emails.

- **Example**: An attacker sends an email pretending to be from a


legitimate service, asking the user to log in to a fake website, where they
capture the user's credentials.

5. **Shoulder Surfing**:

- This method involves observing someone enter their password.

- **Example**: An attacker watches over someone's shoulder as they


enter their password on a keyboard or mobile device.

### Real-Time Examples:

1. **Celebrity Email Hacks**:

- In 2014, a large number of celebrities had their private photos leaked


due to compromised iCloud accounts. Many of these hacks were attributed
to weak passwords and security questions, along with targeted phishing
attacks.
2. **Brute Force Attack on SSH**:

- Attackers often target SSH (Secure Shell) services on servers by


attempting to brute force login credentials. Administrators mitigate this by
implementing strong password policies and using SSH keys instead of
passwords.

3. **Phishing Attack on Google Docs**:

- In 2017, a widespread phishing attack targeted Google Docs users. The


attack involved sending users a fake Google Docs link, which, when clicked,
asked for their Google credentials, allowing attackers to gain access to their
accounts.

### Preventive Measures:

- **Use Strong Passwords**: Encourage the use of complex passwords that


include a mix of letters, numbers, and special characters.

- **Enable Multi-Factor Authentication (MFA)**: Adding an extra layer of


security can prevent unauthorized access even if the password is
compromised.

- **Regular Password Changes**: Regularly changing passwords can reduce


the risk of password guessing attacks.

- **Educate Users**: Train users to recognize phishing attempts and other


social engineering tactics.

- **Account Lockout Policies**: Implement policies that lock accounts after


a certain number of failed login attempts to thwart brute force attacks.
By understanding and implementing these preventive measures,
organizations can protect their systems from password guessing attacks
and enhance their overall security posture.

4.Common Types of Social Engineering Attacks:

1. **Phishing**:

- **Description**: Attackers use fraudulent emails, messages, or


websites to trick users into revealing sensitive information, such as
passwords or financial details.

- **Impact**: Users may inadvertently provide access credentials to


attackers, compromising the security of the entire distributed system.

2. **Spear Phishing**:

- **Description**: A more targeted form of phishing, where attackers


focus on specific individuals or organizations.

- **Impact**: High-level executives or key personnel may be tricked into


revealing critical information, leading to broader system compromises.

3. **Business Email Compromise (BEC)**:

- **Description**: Attackers impersonate company executives or trusted


vendors to request urgent financial transactions or sensitive data.

- **Impact**: Financial losses and unauthorized access to sensitive


corporate information can disrupt operations across the distributed
system.
4. **Pretexting**:

- **Description**: Attackers create a fabricated scenario to obtain


information from their target.

- **Impact**: Employees may divulge confidential information or


perform actions that compromise system security.

5. **Baiting**:

- **Description**: Attackers offer something enticing, such as a free


download or a USB drive, to lure victims into compromising their
systems.

- **Impact**: Malware or other malicious software can be introduced


into the distributed system, leading to widespread security breaches.

6. **Tailgating/Piggybacking**:

- **Description**: Attackers follow authorized personnel into restricted


areas without proper authentication.

- **Impact**: Physical access to critical infrastructure can lead to direct


attacks on the distributed system.

### Real-Time Examples:

1. **Phishing Attack on a Financial Institution**:

- **Scenario**: Attackers send emails to employees of a financial


institution, posing as IT support, asking them to click on a link to update
their passwords.

- **Impact**: Employees who fall for the scam may reveal their login
credentials, allowing attackers to access the institution's distributed
network and steal sensitive financial data.
2. **Spear Phishing Targeting Executives**:

- **Scenario**: Attackers send personalized emails to executives of a


large corporation, requesting urgent wire transfers for a supposed
business deal.

- **Impact**: Executives who comply with the request may transfer


large sums of money to attacker-controlled accounts, causing significant
financial loss and disruption to the company's operations.

3. **Baiting with Infected USB Drives**:

- **Scenario**: Attackers leave USB drives labeled as "Confidential" in


the parking lot of a company.

- **Impact**: Employees who plug the USB drives into their computers
may inadvertently install malware, which spreads across the distributed
system, compromising security and data integrity.

### Preventive Measures:

- **Employee Training**: Regularly educate employees about the types of


social engineering attacks and how to recognize them.

- **Multi-Factor Authentication (MFA)**: Implement MFA to add an extra


layer of security for accessing critical systems.

- **Security Policies**: Establish and enforce strong security policies,


including password management and access controls.

- **Incident Response Plan**: Develop and maintain an incident response


plan to quickly address any security breaches.
5.phishing countermeasures in distributes systems
Phishing attacks can be particularly damaging in distributed systems, as
they target the human element, which is often the weakest link in security.
Here are some effective countermeasures to protect against phishing in
distributed systems:

Countermeasures:

1. Employee Training and Awareness:


o Conduct regular training sessions to educate employees about
the dangers of phishing and how to recognize phishing
attempts.
o Use simulated phishing attacks to test employees' awareness
and provide feedback.
2. Email Filtering and Anti-Phishing Tools:
o Implement email filtering solutions that can detect and block
phishing emails before they reach users.
o Use anti-phishing tools that analyze URLs and attachments for
malicious content.
3. Multi-Factor Authentication (MFA):
o Enforce MFA to add an extra layer of security. Even if
credentials are compromised, attackers would still need the
second factor to gain access.
4. Regular Security Updates and Patches:
o Keep all systems, software, and applications up to date with the
latest security patches to protect against known vulnerabilities.
5. Incident Response Plan:
o Develop and maintain an incident response plan to quickly
address any phishing attacks that occur. This plan should
include steps for reporting incidents, isolating affected
systems, and recovering data.
6. Digital Signatures and Certificates:
o Use digital signatures and certificates to verify the authenticity
of emails and websites. This helps users distinguish between
legitimate and malicious communications.
7. Access Control Policies:
o Implement strict access control policies to limit the amount of
sensitive information that employees can access. Use role-
based access control (RBAC) to ensure that users only have
access to the data they need.
8. Regular Security Audits:
o Conduct regular security audits to identify and address
potential vulnerabilities in the system. This includes reviewing
access logs and monitoring for unusual activity.
9. Reporting Mechanisms:
o Provide clear and easy-to-use mechanisms for employees to
report suspicious emails or activities. Encourage a culture of
vigilance and prompt reporting.
10. Use of Secure Communication Channels:
o Encourage the use of secure communication channels, such as
encrypted messaging apps and secure email services, to reduce
the risk of interception and phishing attacks.

6.Spoofing in distributes system

Spoofing in distributed systems involves attackers impersonating


legitimate entities to gain unauthorized access or disrupt services. Here
are some common types of spoofing attacks and their impact on
distributed systems:

### Types of Spoofing Attacks:

1. **IP Spoofing**:

- **Description**: Attackers falsify the source IP address of packets to


hide their identity or impersonate another system.

- **Impact**: Used in Distributed Denial of Service (DDoS) attacks to


overwhelm systems and in network reconnaissance to bypass security
measures.

2. **Email Spoofing**:
- **Description**: Attackers send emails that appear to come from a
legitimate source to trick recipients into divulging sensitive information
or clicking on malicious links.

- **Impact**: Can lead to data breaches, malware infections, and


financial losses.

3. **Website Spoofing**:

- **Description**: Attackers create fake websites that mimic legitimate


ones to steal login credentials or spread malware.

- **Impact**: Users may unknowingly provide sensitive information,


leading to unauthorized access and data theft.

4. **ARP Spoofing**:

- **Description**: Attackers send falsified ARP (Address Resolution


Protocol) messages to associate their MAC address with the IP address of
another device on the network.

- **Impact**: Enables Man-in-the-Middle (MitM) attacks, allowing


attackers to intercept and manipulate data.

5. **DNS Spoofing**:

- **Description**: Attackers corrupt DNS (Domain Name System) data


to redirect users to malicious websites.

- **Impact**: Users may be directed to phishing sites, leading to


credential theft and malware infections.

### Countermeasures:

1. **Network Security Measures**:


- Implement firewalls and intrusion detection systems (IDS) to monitor
and block suspicious activities.

- Use IP filtering to block traffic from known malicious IP addresses.

2. **Email Security**:

- Deploy email filtering solutions to detect and block phishing emails.

- Use email authentication protocols like SPF, DKIM, and DMARC to


verify the legitimacy of incoming emails.

3. **Secure Communication**:

- Use encryption protocols (e.g., SSL/TLS) to secure data transmission


between nodes in the distributed system.

- Implement mutual authentication to ensure both parties are verified.

4. **Access Control**:

- Enforce strict access control policies to limit the amount of sensitive


information that users can access.

- Use role-based access control (RBAC) to ensure users only have access
to the data they need.

5. **Regular Security Audits**:

- Conduct regular security audits to identify and address potential


vulnerabilities in the system.

- Review access logs and monitor for unusual activity.

6. **Employee Training**:
- Educate employees about the dangers of spoofing attacks and how to
recognize them.

- Conduct regular training sessions and simulated phishing attacks to


test awareness.

7.Attacks on password entry in distributes system


Password entry attacks in distributed systems are a common threat, as
attackers target the authentication process to gain unauthorized access.
Here are some common types of attacks and how they can impact
distributed systems:

### Types of Password Entry Attacks:

1. **Brute Force Attack**:

- **Description**: Attackers systematically try all possible password


combinations until they find the correct one.

- **Impact**: Can lead to unauthorized access if weak passwords are


used. Mitigated by account lockout policies and strong password
requirements.

2. **Credential Stuffing**:

- **Description**: Attackers use stolen username and password pairs


from one breach to try logging into other systems.

- **Impact**: Can lead to widespread account compromises if users


reuse passwords across multiple services.

3. **Phishing**:
- **Description**: Attackers trick users into revealing their passwords
through fake login pages or emails.

- **Impact**: Users may unknowingly provide their credentials, leading


to unauthorized access and data breaches.

4. **Man-in-the-Middle (MitM) Attack**:

- **Description**: Attackers intercept communication between the user


and the authentication server to steal passwords.

- **Impact**: Enables attackers to capture passwords and potentially


alter communication.

5. **Keylogging**:

- **Description**: Malware records the keystrokes of users, capturing


passwords as they are entered.

- **Impact**: Can lead to the theft of multiple passwords and


unauthorized access to various accounts.

6. **Shoulder Surfing**:

- **Description**: Attackers observe users entering their passwords.

- **Impact**: Can lead to the direct theft of passwords, especially in


public or shared environments.

### Countermeasures:

1. **Use Strong Passwords**: Encourage the use of complex passwords


with a mix of letters, numbers, and special characters.
2. **Implement Multi-Factor Authentication (MFA)**: Add an extra layer
of security by requiring a second form of verification.

3. **Regularly Update Passwords**: Enforce policies for periodic


password changes to reduce the risk of compromised credentials.

4. **Educate Users**: Train employees on recognizing phishing attempts


and the importance of not reusing passwords.

5. **Use Account Lockout Policies**: Implement policies that lock


accounts after a certain number of failed login attempts to prevent brute
force attacks.

6. **Monitor for Suspicious Activity**: Use intrusion detection systems


(IDS) and monitor access logs for unusual login patterns.

7. **Secure Communication Channels**: Use encryption protocols like


SSL/TLS to secure data transmission between nodes in the distributed
system.

8.Attacking on password storage


Attacks on password storage in distributed systems can be particularly
damaging as they target the very foundation of user authentication. Here
are some common types of attacks and their impact:

### Types of Password Storage Attacks:

1. **Credential Theft**:

- **Description**: Attackers gain access to password storage locations


to steal user credentials.

- **Impact**: Once credentials are obtained, attackers can perform


lateral movement within the system and access restricted information.
2. **Hash Cracking**:

- **Description**: Attackers steal the file containing hashed passwords


and attempt to crack them using various techniques, such as dictionary
attacks or brute force.

- **Impact**: Can lead to the recovery of plaintext passwords, allowing


unauthorized access to user accounts.

3. **Keylogging**:

- **Description**: Malware records the keystrokes of users, capturing


passwords as they are entered.

- **Impact**: Can lead to the theft of multiple passwords and


unauthorized access to various accounts.

4. **Man-in-the-Middle (MitM) Attack**:

- **Description**: Attackers intercept communication between the user


and the authentication server to steal passwords.

- **Impact**: Enables attackers to capture passwords and potentially


alter communication.

5. **Social Engineering**:

- **Description**: Attackers use psychological manipulation to trick


users into revealing their passwords.

- **Impact**: Users may unknowingly provide their credentials, leading


to unauthorized access and data breaches.

### Countermeasures:
1. **Use Strong Hashing Algorithms**: Store passwords using strong,
salted hashing algorithms to make cracking more difficult.

2. **Implement Multi-Factor Authentication (MFA)**: Add an extra layer


of security by requiring a second form of verification.

3. **Regularly Update Passwords**: Enforce policies for periodic


password changes to reduce the risk of compromised credentials.

4. **Encrypt Password Files**: Use encryption to protect password files


stored on disk.

5. **Monitor for Suspicious Activity**: Use intrusion detection systems


(IDS) and monitor access logs for unusual login patterns.

6. **Educate Users**: Train employees on recognizing phishing attempts


and the importance of not reusing passwords.

7. **Secure Communication Channels**: Use encryption protocols like


SSL/TLS to secure data transmission between nodes in the distributed
system.

9.protecting the password file in distributed system


Let's consider a real-time example of protecting a password file in a
distributed system using a combination of encryption, hashing, access
control, and regular audits.

Scenario: A Distributed E-commerce Platform

1. Encryption

The e-commerce platform stores user passwords in a central database. To


protect these passwords, the platform uses AES-256 encryption. This
ensures that even if an attacker gains access to the database, the passwords
remain unreadable without the decryption key.
2. Hashing

When users create or update their passwords, the platform hashes the
passwords using bcrypt before storing them in the database. Bcrypt is
chosen because it includes a salt and is computationally intensive, making
it resistant to brute-force attacks.

3. Access Control

Access to the password file is restricted using role-based access control


(RBAC). Only the authentication service and a few authorized
administrators have access to the password file. This minimizes the risk of
unauthorized access.

4. Regular Audits

The platform conducts regular security audits to ensure compliance with


security policies and to identify potential vulnerabilities. These audits
include checking for weak passwords, ensuring encryption keys are rotated
regularly, and verifying that access controls are properly enforced.

Example in Action

1. User Registration: When a new user registers, their password is


hashed using bcrypt and then stored in the encrypted database.
2. User Login: During login, the entered password is hashed using
bcrypt and compared with the stored hash. If they match, the user is
authenticated.
3. Access Control: Only the authentication microservice can access the
password hashes. Even if a developer tries to access the database
directly, they won't be able to read the password hashes due to
encryption and access control policies.
4. Audit: Regular audits are performed to check for any unauthorized
access attempts, ensuring that the encryption keys are up-to-date
and that the hashing algorithm remains secure.

By implementing these strategies, the e-commerce platform ensures that


user passwords are protected even in a distributed environment. This
approach not only secures the passwords but also builds trust with users
by safeguarding their sensitive information.
10.single sign-on

Single Sign-On (SSO) is a user authentication process that allows users to


access multiple applications with one set of login credentials. This
simplifies the user experience and enhances security by reducing the
number of times users need to enter their passwords. Let's explore a real-
time example of SSO in a distributed system.

Scenario: A Corporate Environment Using SSO

1. Overview

A large corporation uses multiple applications for various business


functions, including email, file storage, project management, and HR
systems. To streamline access and improve security, the corporation
implements SSO using OAuth2 and JWT (JSON Web Tokens).

2. Components Involved

 Identity Provider (IdP): The central authentication server that


verifies user credentials.
 Service Providers (SPs): The various applications (e.g., email, file
storage) that users need to access.
 OAuth2: The protocol used for authorization.
 JWT: The token format used to securely transmit user information.

3. SSO Process

1. User Login: The user attempts to access the project management


tool.
2. Redirection to IdP: The tool redirects the user to the IdP for
authentication.
3. Authentication: The user enters their credentials (username and
password) at the IdP.
4. Token Generation: Upon successful authentication, the IdP
generates a JWT containing user information and permissions.
5. Token Transmission: The JWT is sent back to the project
management tool.
6. Access Granted: The project management tool verifies the JWT and
grants the user access.

4. Real-Time Example

Google Workspace: When a user logs into Gmail, they are automatically
authenticated for other Google services like Google Drive, Google Calendar,
and YouTube. Here’s how it works:

1. User Login: The user logs into Gmail using their Google credentials.
2. SSO Token: Google’s IdP authenticates the user and generates an SSO
token.
3. Access to Other Services: When the user navigates to Google Drive,
the SSO token is used to authenticate the user without requiring
them to log in again.
4. Seamless Experience: The user can access multiple Google services
seamlessly with a single login.

5. Benefits

 Improved User Experience: Users only need to remember one set of


credentials.
 Enhanced Security: Centralized authentication reduces the risk of
password-related attacks.
 Efficiency: IT departments can manage access controls and
permissions more efficiently.

By implementing SSO, the corporation ensures that users have a seamless


and secure experience across multiple applications, enhancing productivity
and security.

You might also like