<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pratik Avhad on Medium]]></title>
        <description><![CDATA[Stories by Pratik Avhad on Medium]]></description>
        <link>https://medium.com/@avhadpratik09?source=rss-5e022404a19f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*aa_x12F5dBD9Uvi-</url>
            <title>Stories by Pratik Avhad on Medium</title>
            <link>https://medium.com/@avhadpratik09?source=rss-5e022404a19f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:43:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@avhadpratik09/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ How HTTPS Ensures Security: The Role of SSL/TLS Certificates]]></title>
            <link>https://medium.com/@avhadpratik09/how-https-ensures-security-the-role-of-ssl-tls-certificates-a6bc3de4d8ac?source=rss-5e022404a19f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6bc3de4d8ac</guid>
            <dc:creator><![CDATA[Pratik Avhad]]></dc:creator>
            <pubDate>Sun, 29 Jun 2025 14:40:00 GMT</pubDate>
            <atom:updated>2025-06-29T14:40:00.031Z</atom:updated>
            <content:encoded><![CDATA[<p>The internet has largely transitioned from <strong>HTTP</strong> (Hypertext Transfer Protocol) to <strong>HTTPS</strong> (HTTP Secure) to combat rising cybersecurity threats.</p><p>But what makes <strong>HTTPS</strong> secure? The secret lies in <strong>TLS encryption</strong>, <strong>authentication</strong>, and <strong>data integrity</strong> — all of which are enabled by <strong>SSL/TLS certificates</strong>.</p><p>Despite the term “SSL certificate” still being commonly used, today’s encryption standard is <strong>TLS (Transport Layer Security)</strong>, the modern and more secure successor to SSL(Secure Socket Layer).</p><h3><strong>🔐 How HTTPS Ensures Security</strong></h3><h4>HTTPS secures your connection with a combination of:</h4><ol><li><strong>Encryption</strong> — to protect data in transit</li><li><strong>Authentication</strong> — to confirm the identity of the website</li><li><strong>Integrity</strong> — to ensure that data is not altered</li></ol><p>But all of this is made possible by a powerful process called the <strong>TLS handshake</strong>, which runs when you first connect to a website.</p><h3>🤝 What Is the TLS/SSL Handshake?</h3><p>When you visit a secure website (e.g., https://example.com), your browser and the server perform a <strong>TLS handshake</strong> before any data is exchanged.</p><p>Here’s a step-by-step breakdown:</p><h3>🧾 Step 1: Server Shares SSL/TLS Certificate</h3><p>The server responds with its <strong>SSL/TLS certificate</strong>, which includes:</p><ul><li>The website’s <strong>public key</strong></li><li>The <strong>domain name</strong></li><li>The <strong>issuer (Certificate Authority — CA)</strong></li><li>The <strong>digital signature</strong> created by the CA</li></ul><h3>🖋️ How the Digital Signature Is Created (by the CA)</h3><p>The website owner creates a <strong>public-private key pair</strong> and generates a <strong>CSR (Certificate Signing Request)</strong> containing:</p><ul><li>Public key</li><li>Domain name</li><li>Organization info</li></ul><ol><li>The <strong>Certificate Authority (CA)</strong> verifies the information.</li><li>The CA creates a <strong>hash</strong> of the certificate’s data using a hashing algorithm (e.g., SHA-256)</li></ol><ul><li>hash = SHA256(certificate_data)</li></ul><p>3. The CA <strong>encrypts the hash</strong> using its own <strong>private key</strong> to create the <strong>digital signature</strong>:</p><ul><li>digital_signature = encrypt(hash, CA_private_key)</li></ul><p>This <strong>signed hash</strong> (digital signature) is attached to the certificate and returned to the server.</p><h3>🔏 Step 2: Client Verifies the Certificate</h3><p>Your browser (client) checks the certificate using the following process:</p><ol><li><strong>Hashing</strong>: It hashes the certificate original data using SHA-256.</li><li><strong>Signature Decryption</strong>: It decrypts the certificate’s <strong>digital signature</strong> using the <strong>CA’s public key</strong> (pre-installed in the browser).</li><li><strong>Hash Comparison</strong>: It compares the two hashes:</li></ol><ul><li>If they match ➝ The certificate is <strong>authentic and untampered</strong></li><li>If not ➝ It’s either <strong>expired</strong>, <strong>invalid</strong>, or <strong>forged</strong></li></ul><p>✅ This confirms the site is legitimate and issued by a <strong>trusted Certificate Authority</strong>.</p><h3>🔐 Step 3: Key Exchange and Symmetric Encryption</h3><p>Once the certificate is verified:</p><ul><li>The client and server agree on a <strong>shared symmetric key</strong> (e.g., using RSA, ECDHE)</li><li>This key is used for <strong>encrypting the rest of the session</strong></li><li>All further communication is <strong>encrypted with AES-256 (or similar)</strong></li></ul><blockquote><em>🔒 This ensures </em><strong><em>Perfect Forward Secrecy</em></strong><em>, meaning even if one session key is compromised, past sessions remain protected</em></blockquote><h3>🔍 Why TLS Certificates Are Essential for Security</h3><h3>1. Encryption: Securing Data in Transit</h3><ul><li>Prevents eavesdropping(to listen secretly to other people talking.) and packet sniffing</li><li>Uses AES-256 symmetric encryption for high-speed security</li></ul><h3>2. Authentication: Preventing Phishing</h3><ul><li>TLS certificates verify that the server is <strong>who it claims to be</strong></li><li>Browsers block invalid or self-signed certs</li></ul><h3>3. Data Integrity: Blocking Tampering</h3><ul><li>TLS includes <strong>Message Authentication Codes (MACs)</strong></li><li>Even a single bit flip is caught and the connection is dropped</li></ul><h3>🛡️ HTTPS Defends Against:</h3><p>✅ <strong>Man-in-the-middle (MITM) attacks</strong><br> ✅ <strong>Session hijacking</strong><br> ✅ <strong>Fake/phishing websites</strong><br> ✅ <strong>Data injection and modification</strong></p><p>That little padlock 🔐 isn’t just decoration — it’s your first line of defense online. Always look for it before entering sensitive information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6bc3de4d8ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Understanding Authentication: From Session-Based to Token-Based and Beyond…]]></title>
            <link>https://medium.com/@avhadpratik09/understanding-authentication-from-session-based-to-token-based-and-beyond-5cf24a578a4d?source=rss-5e022404a19f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5cf24a578a4d</guid>
            <dc:creator><![CDATA[Pratik Avhad]]></dc:creator>
            <pubDate>Tue, 18 Feb 2025 17:50:35 GMT</pubDate>
            <atom:updated>2025-02-18T17:50:35.763Z</atom:updated>
            <content:encoded><![CDATA[<p>Authentication is a crucial component of any application to verify user identity and protect sensitive information.</p><p>Different types of authentication methods beyond the commonly known session-based and token-based authentication:</p><ol><li>Session-Based Authentication <em>(Traditional)</em></li><li>Token-Based Authentication <em>(Modern)</em></li><li>API Key Authentication <em>(Basic Security)</em></li><li>OAuth 2.0 Authentication <em>(Authorization Protocol)</em></li><li>SAML <em>(Security Assertion Markup Language)</em> <em>(Enterprise SSO</em></li><li>LDAP <em>(Lightweight Directory Access Protocol)</em> <em>(Directory-Based)</em></li><li>Multi-Factor Authentication <em>(MFA)</em> <em>(Layered Security)</em></li></ol><h3>1️⃣ Session-Based Authentication (Traditional)</h3><ul><li>Relies on <strong>server-side sessions</strong> and <strong>cookies</strong>.</li><li>A session ID is stored on the server after successful login.</li><li>The browser sends this ID with every request.</li></ul><p><strong>How it Works:</strong></p><ol><li>User logs in → Server creates a session ID.</li><li>Session ID stored server-side + cookie in the client.</li><li>Each request → server verifies session ID.</li></ol><p><strong>Limitations:</strong></p><ul><li>Not scalable (server stores all session data).</li><li>CSRF attacks possible without CSRF tokens.</li></ul><h3>2️⃣ Token-Based Authentication (Modern)</h3><ul><li>Uses <strong>stateless tokens</strong> like <strong>JWT (JSON Web Tokens)</strong>.</li><li>Tokens contain user info + signature.</li></ul><p><strong>How it Works:</strong></p><ol><li>User logs in → Server generates a <strong>JWT token</strong>.</li><li>Token sent with each request (<strong>Authorization: Bearer </strong>).</li><li>Server verifies signature → grants access.</li></ol><blockquote><strong>Limitations:</strong></blockquote><ul><li>Token theft can lead to unauthorized access.</li><li>Tokens are stored on the client-side (localStorage/sessionStorage).</li></ul><h3>3️⃣ API Key Authentication (Basic Security)</h3><ul><li>Each request includes an <strong>API key</strong> as a credential.</li><li>No sessions/tokens involved.</li><li>Popular in APIs that don’t require user-specific authentication.</li></ul><p><strong>How it Works:</strong></p><ol><li>Client gets an <strong>API key</strong> from the server.</li><li>Each request → includes <strong>API key</strong> as a header (X-API-Key: abc123).</li></ol><p><strong>Examples:</strong></p><ul><li><strong>Google Cloud APIs</strong> → API keys</li><li><strong>OpenAI API</strong> → API key in headers</li></ul><p><strong>Limitations:</strong></p><ul><li>No user identity → just a key.</li><li>If the key is exposed, anyone can access the API.</li></ul><h3>4️⃣ OAuth 2.0 Authentication (Authorization Protocol)</h3><ul><li>Delegates access via <strong>third-party providers</strong> (<strong>Google, Facebook, GitHub</strong>).</li><li>Often paired with <strong>OpenID Connect</strong> for user identity.</li></ul><p><strong>How it Works:</strong></p><ol><li>User clicks <strong>“Log in with Google”</strong>.</li><li>Google authenticates user → issues <strong>access + refresh tokens</strong>.</li><li>Tokens grant access to protected resources.</li></ol><p><strong>Examples:</strong></p><ul><li><strong>Google OAuth 2.0</strong> → auth.googleapis.com</li><li><strong>GitHub OAuth</strong> → github.com/login/oauth</li></ul><p><strong>Limitations:</strong></p><ul><li>Complex implementation for developers.</li><li>Token leakage can cause unauthorized access.</li></ul><h3>5️⃣ SAML (Security Assertion Markup Language) (Enterprise SSO)</h3><ul><li>Used in <strong>enterprise Single Sign-On (SSO)</strong> environments.</li><li><strong>XML-based</strong> authentication.</li></ul><p><strong>How it Works:</strong></p><ol><li>User requests a resource → redirected to <strong>identity provider (IdP)</strong>.</li><li>IdP authenticates → sends a <strong>SAML assertion</strong> to the app.</li><li>The app verifies the assertion → grants access.</li></ol><p><strong>Examples:</strong></p><ul><li><strong>Okta</strong>, <strong>Auth0</strong>, <strong>Azure AD</strong>.</li></ul><p><strong>Limitations:</strong></p><ul><li>XML parsing overhead.</li><li>Complex configuration for non-enterprise apps.</li></ul><h3>6️⃣ LDAP (Lightweight Directory Access Protocol) (Directory-Based)</h3><ul><li>Centralized directory service for user credentials.</li><li>Common in <strong>corporate environments</strong>.</li></ul><p><strong>How it Works:</strong></p><ol><li>User logs in → app queries the <strong>LDAP server</strong>.</li><li>LDAP server authenticates based on username/password.</li><li>Access granted if credentials match.</li></ol><p><strong>Examples:</strong></p><ul><li><strong>Active Directory (AD)</strong></li><li><strong>OpenLDAP</strong></li></ul><p><strong>Limitations:</strong></p><ul><li>LDAP communication is plaintext → must use <strong>LDAPS</strong> (SSL).</li><li>Not suitable for modern, stateless APIs.</li></ul><h3>7️⃣ Multi-Factor Authentication (MFA) (Layered Security)</h3><ul><li>Requires <strong>two or more factors</strong> for authentication.</li><li>Factors can be:</li><li><strong>Something you know</strong> → password</li><li><strong>Something you have</strong> → OTP from authenticator app</li><li><strong>Something you are</strong> → fingerprint or face scan</li></ul><p><strong>How it Works:</strong></p><ol><li>User enters <strong>password</strong> → verified.</li><li>App prompts for <strong>OTP or biometric</strong> → verified.</li><li>Access granted if both checks pass.</li></ol><p><strong>Examples:</strong></p><ul><li><strong>Google Authenticator</strong></li></ul><p><strong>Limitations:</strong></p><ul><li>User friction → requires multiple steps.</li><li>OTP phishing still possible.</li></ul><h3>🔑 Key Insights</h3><ul><li>🛠️ <strong>Session-Based:</strong> Simple, but not scalable for APIs.</li><li>⚙️ <strong>Token-Based (JWT):</strong> Ideal for RESTful APIs but token leakage is risky.</li><li>🌐 <strong>OAuth 2.0:</strong> Best for third-party logins.</li><li>🔐 <strong>MFA:</strong> Should be added to critical apps for extra protection.</li></ul><p>Authentication plays a critical role in safeguarding applications from unauthorized access and ensuring a seamless user experience. Choosing the right method depends on your application architecture, security requirements, and scalability needs.</p><p><strong>Happy Securing! 🔐</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cf24a578a4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Apache Kafka: The Backbone of Real-Time Data Streaming]]></title>
            <link>https://medium.com/@avhadpratik09/understanding-apache-kafka-the-backbone-of-real-time-data-streaming-47c715beebe2?source=rss-5e022404a19f------2</link>
            <guid isPermaLink="false">https://medium.com/p/47c715beebe2</guid>
            <dc:creator><![CDATA[Pratik Avhad]]></dc:creator>
            <pubDate>Tue, 28 Jan 2025 01:08:00 GMT</pubDate>
            <atom:updated>2025-01-28T01:08:00.217Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Understanding Apache Kafka: The Backbone of Real-Time Data Streaming</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*l_Zah2Ntv75d-qkQolP7WA.png" /></figure><blockquote><strong>What is Apache Kafka?</strong></blockquote><p>Apache Kafka is a high-throughput, low-latency, fault-tolerant, and scalable event streaming platform designed to handle real-time data. It enables the continuous flow of events between components in a system using an event bus, which collects, processes, and stores data as a stream of continuous records. This makes Kafka ideal for building event-driven architectures and event-bus-based microservices capable of handling large volumes of messages.</p><p>Originally developed at LinkedIn, Kafka has become a popular open-source tool for creating distributed systems, real-time data pipelines, and event-sourcing solutions for enterprise systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*SSPt31C5cfkJ_qOYNLrT5w.png" /></figure><blockquote><strong>Why Kafka?</strong></blockquote><p>Apache Kafka is a powerful event streaming platform that excels in high-throughput, low-latency data processing, making it ideal for real-time analytics, stream processing, and event-driven microservices. Its scalability, fault tolerance, and ability to decouple systems ensure reliability and flexibility for handling large-scale data flows.</p><blockquote><strong>Terminologies in Kafka</strong></blockquote><ul><li><strong>Topics:</strong> A category or feed name where messages are published by producers. Topics are used to organize and group messages logically.</li><li><strong>Partitions: </strong>Each topic is divided into smaller units called partitions, enabling parallel processing. Each partition stores a subset of the topic’s data and ensure scalability.</li><li><strong>Offset: </strong>A unique identifier for each message in a partition. Consumers use offsets to track their position in a topic.</li><li><strong>Producers: </strong>A client that writes or publishes messages to Kafka topics. Producers can choose which partition to send messages to within a topic.</li><li><strong>Consumers: </strong>A client that reads or subscribes to messages from Kafka topics. Consumers can work individually or as part of a consumer group.</li><li><strong>Consumer Group</strong>: A group of consumers that share the workload of consuming messages from a topic. Each message is delivered to only one consumer within a group.</li><li><strong>Brokers: </strong>A Kafka server that stores data and serves client requests for publishing and consuming messages. A Kafka cluster typically consists of multiple brokers.</li><li><strong>Clusters:</strong> A group of brokers working together as a single system to handle message storage and retrieval. Kafka clusters are highly scalable and fault tolerant.</li><li><strong>Zookeeper: </strong>An older component used in Kafka to manage metadata, coordinate brokers, and handle leader elections. It is being phased out in Favor of KRaft.</li><li><strong>Kraft (Kafka Raft Protocol):</strong> A newer consensus protocol in Kafka that replaces ZooKeeper. It manages metadata directly within Kafka, simplifying deployment and improving scalability.</li></ul><blockquote><strong>Kafka Workflow</strong></blockquote><p>Kafka operates as a collection of topics split into one or more <strong>partitions</strong>, which are linearly ordered sequences of messages identified by unique <strong>offsets</strong>. Producers write messages to <strong>topics</strong>, appending them to the end of partitions, while consumers read messages sequentially. Kafka ensures durability by persisting messages to disk and replicating them across <strong>brokers</strong>, providing fault tolerance and high availability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*Dv4s_GSycoskPAHusbNheA.png" /></figure><p><strong>Producer-Consumer Workflow: </strong>Producers send messages to topics without needing to manage how messages are consumed. Consumers can choose between two messaging models based on their use case:</p><ul><li><strong>Pub-Sub Messaging:</strong> Multiple consumers subscribe to the same topic and receive all messages broadcasted to that topic. This model is ideal for real-time streaming, notifications, or broadcasting events to multiple independent applications.</li><li><strong>Queue Messaging </strong>(Consumer Groups): Consumers form a consumer group to share the workload of processing messages from a topic. Each partition is assigned to only one consumer in the group, ensuring that each message is processed once while allowing parallelism and scalability.</li></ul><p>This flexibility allows Kafka to support diverse use cases, ensuring high throughput, low latency, and reliability for real-time event streaming and large-scale distributed systems.</p><blockquote><strong>Kafka Architecture:</strong></blockquote><p>Kafka’s architecture is built for scalability, fault tolerance, and high performance, making it a preferred choice for event-driven systems, real-time analytics, and streaming pipelines. At its core, Kafka operates as a distributed system running on a cluster of brokers, which work together to handle massive amounts of data. Kafka’s architecture supports a producer-subscriber model with flexibility to implement both pub-sub and queue-based messaging patterns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*zVAGe54K61VTES96YBL0gw.png" /></figure><p><strong>Topic Replication in Kafka:</strong></p><p>Kafka ensures fault tolerance and data durability through <strong>topic replication</strong>. Each topic in Kafka is divided into partitions, and each partition has one or more replicas distributed across brokers in the cluster. Among these replicas, one is designated as the <strong>leader</strong>, and the others act as <strong>followers</strong>.</p><ul><li><strong>Leader-Follower Mechanism</strong>: Producers and consumers interact with the <strong>leader</strong> replica for read and write operations, while <strong>followers</strong> replicate data from the leader.</li><li><strong>High Availability</strong>: If a broker hosting the leader replica fails, one of the followers is automatically elected as the new leader, ensuring uninterrupted data flow.</li><li><strong>Replication Factor</strong>: Configured per topic, it defines the number of copies of each partition to maintain. For example, a replication factor of 3 means there are three copies of every partition across the cluster.</li></ul><p><strong>Interactions in the Kafka Architecture:</strong></p><ul><li><strong>Producers to Kafka Cluster:</strong> Producers send data to the Kafka cluster. The data is published to specific topics, which are then divided into partitions and distributed across the brokers.</li><li><strong>Kafka Cluster to Consumers:</strong> Consumers read data from the Kafka cluster. They subscribe to topics and consume data from the partitions assigned to them. The consumer group ensures that the load is balanced and that each partition is processed by only one consumer in the group.</li></ul><blockquote><strong>Kafka Use Cases</strong></blockquote><p>Apache Kafka is a versatile platform with a wide range of use cases that make it an essential component in many real-time data streaming applications. Here are some of the key use cases:</p><ol><li><strong>Event Sourcing: </strong>Kafka is ideal for <strong>event sourcing</strong>, which is a design pattern where state changes are captured as a sequence of events. Kafka allows the efficient collection of log data, making it a crucial part of systems where logs need to be processed and analyzed in real-time.</li><li><strong>Message Broker: </strong>Kafka acts as a highly efficient message broker, capable of handling large volumes of data. Its high throughput and publish-subscribe messaging system make it an ideal choice for organizations that need to efficiently process and transfer messages or data across multiple applications.</li><li><strong>Metrics Collection and Monitoring: </strong>Kafka is commonly used for monitoring operational data by providing centralized feeds from various sources such as security logs, application logs, and system metrics. This makes it easy to track and analyze the health and performance of systems in real time, enabling faster identification of issues and improving decision-making.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47c715beebe2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>