<?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 i.hrishikesh nate on Medium]]></title>
        <description><![CDATA[Stories by i.hrishikesh nate on Medium]]></description>
        <link>https://medium.com/@ihrishikeshnate?source=rss-d62f1e096a72------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Cmiq52-ZCYhv8xRF.jpg</url>
            <title>Stories by i.hrishikesh nate on Medium</title>
            <link>https://medium.com/@ihrishikeshnate?source=rss-d62f1e096a72------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:15:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ihrishikeshnate/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[From “Can It?” to “Should It?” — Part I]]></title>
            <link>https://ihrishikeshnate.medium.com/from-can-it-to-should-it-part-i-003c05d465d1?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/003c05d465d1</guid>
            <category><![CDATA[ihrishikeshnate]]></category>
            <category><![CDATA[context-awareness]]></category>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Wed, 26 Aug 2026 09:47:13 GMT</pubDate>
            <atom:updated>2026-08-26T09:47:13.394Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Contextual Authorization Layer for AI Agents</h3><p><em>Why static IAM is failing autonomous systems, and how to build a stateful security layer.</em></p><h3>The uncomfortable problem</h3><p>Consider two commands:</p><pre>rm -rf ./build</pre><p>and:</p><pre>rm -rf /</pre><p>Same primitive operation. Same binary. At a basic authorization layer, the question is essentially whether the user has permission to modify the target path.</p><p>Yet the security meaning is completely different.</p><p>Traditional authorization is very good at answering <em>can this principal perform this action?</em> It is much less good at answering <em>should this action be performed right now, against this resource, with this data, in this environment, given what has already happened?</em></p><p>That gap has always existed. It was survivable largely because humans are slow, have judgment, notice when something looks wrong, and generally stop to think before doing something catastrophic.</p><p>Agents don’t have that property by default. They can execute repeatedly, quickly, across multiple systems, following an objective without understanding the consequences the way a human does.</p><blockquote><em>The problem isn’t that agents are intelligent. The problem is that we’re giving machine-speed software permissions designed around human behaviour.</em></blockquote><h3>Why agents expose this weakness</h3><p>Classic authorization can be represented as:</p><pre>Human<br>  ↓<br>Permission (scope|priviledge|environment|in-time)<br>  ↓<br>Resource</pre><p>An agent-mediated action looks more like:</p><pre>Human<br>  ↓<br>Agent<br>  ↓<br>Tool<br>  ↓<br>Action<br>  ↓<br>Resource<br>  ↓<br>Data</pre><p>Every additional layer is a place where the original human intent can be reinterpreted, and those layers can be exercised at machine speed.</p><p>A person with s3:DeleteObject might use it once a month, deliberately, after thinking about what they&#39;re deleting. An agent with the same permission might call it fifty times in ten seconds because an instruction told it to &quot;clean up the bucket.&quot; The permission didn&#39;t change. The blast radius did.</p><p>That is the reason agentic systems need more context in the authorization decision than static IAM was designed to carry.</p><h3>What existing security already does well</h3><p>It is worth being honest about this. This isn’t an argument that existing security controls are inadequate at everything they do.</p><ul><li><strong>EDR</strong> provides visibility into endpoint activity.</li><li><strong>DLP</strong> understands data movement.</li><li><strong>IAM</strong> handles identity and permissions.</li><li><strong>MCP authorization</strong> provides authentication and authorization mechanisms between clients and tool servers.</li><li><strong>SIEM</strong> correlates security events.</li></ul><p>Each of these solves an important part of the problem. The gap is in the space between those signals and an enforcement decision — something that answers, given everything we know about this agent and this action, whether the action should be allowed. That is the layer I wanted to explore.</p><h3>Defining the authorization problem</h3><p>I started treating authorization not as a property of an action, but as a property of an action in context.</p><p>The model is:</p><pre>Decision =<br>f(<br>    user,<br>    agent,<br>    action,<br>    resource,<br>    data,<br>    session_state,<br>    environment<br>)</pre><p>with three possible outcomes:</p><pre>ALLOW<br>ESCALATE<br>DENY</pre><p>ESCALATE is important. It isn&#39;t a failure of automation. It is a deliberate outcome for cases where the system has enough information to know that an action deserves scrutiny, but not enough confidence to safely allow or deny it automatically.</p><p>A binary allow/deny model forces ambiguous cases into one of two extremes: allow too much, or block too much. Both are bad for real systems. An explicit escalation path makes human judgment part of the control rather than treating it as a failure of automation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4xD9BIzycLdCTemVaxAnew.png" /></figure><h3>Don’t trust the authorization request</h3><p>This ended up being one of the most important implementation lessons.</p><p>Early versions of the policy decision point accepted security-relevant facts from the authorization request itself. For example:</p><pre>request says:<br>    category = read</pre><pre>request says:<br>    environment = local</pre><pre>request says:<br>    consumes = []</pre><p>That is a trust-boundary failure. If the thing asking for authorization can also define the facts that determine whether it should be authorized, then authorization becomes self-attestation. An agent could effectively say “this is a read operation, against a local resource, with no sensitive data involved” — and the PDP would have no reason to disagree.</p><blockquote><em>An authorization request is evidence, not truth.</em></blockquote><p>Security-relevant facts need to be derived or independently validated. The requested operation determines its semantic category. Resource resolution determines the environment. Session state belongs to the PDP rather than the caller.</p><p>This distinction became important enough that several early bypasses were fixed specifically at this trust boundary.</p><h3>From tool permissions to semantic permissions</h3><p>Different systems express the same intent in completely different ways:</p><pre>delete_rds_instance<br>DROP DATABASE<br>aws s3 rb<br>rm -rf</pre><p>A policy written around every individual tool quickly becomes an unmaintainable list of vendor-specific exceptions. Instead, the system first normalizes operations into semantic categories:</p><pre>delete_rds_instance ─┐<br>DROP DATABASE        ├──→ DESTRUCTIVE<br>aws s3 rb            │<br>rm -rf               ┘</pre><p>Now a policy can say “no destructive actions in production” rather than requiring a separate rule for every database, cloud provider, CLI, and agent tool.</p><p>This doesn’t eliminate ambiguity — it moves it into a controlled normalization layer. Unknown or unresolvable operations should remain unknown rather than being optimistically classified. A classifier is part of the security boundary too.</p><h3>Authorization needs memory</h3><p>This is probably the centerpiece of the system.</p><p>Consider these actions individually:</p><pre>read credential       → allowed<br>assume role           → allowed<br>access production     → allowed<br>delete resource       → allowed</pre><p>Nothing necessarily looks wrong. Now consider the sequence:</p><pre>credential<br>    ↓<br>privilege escalation<br>    ↓<br>production access<br>    ↓<br>destruction</pre><p>The sequence tells a different story — the final delete operation cannot be evaluated independently from what happened before it. Authorization for autonomous systems cannot always be a stateless function of the current request; the PDP needs to maintain security state across the session.</p><p>The implementation tracks things like accumulated privilege, sensitive-data exposure, action velocity, recent destructive activity, category sequences, and data lineage. The result is closer to a running security state than a traditional one-shot permission check.</p><h3>Data flow makes the problem harder</h3><p>The same principle applies to data.</p><p>Imagine an agent that sits between a private database and a public channel:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ArvyP8_Ncg9LPprQohK3g.png" /></figure><p>The agent might legitimately have READ PostgreSQL and SEND Slack. Neither permission is necessarily problematic by itself. The problem is the combination: if the agent reads restricted data from PostgreSQL and then attempts to publish it into a public Slack channel, the security violation emerges from the data flow across multiple actions, not from either action alone.</p><p>The PDP therefore needs to understand source classification, data lineage, and destination exposure together, rather than looking only at individual tool permissions. That allows a policy to express something closer to “restricted data must not cross into a public destination” — fundamentally different from simply asking whether the agent has permission to read the database or send a Slack message.</p><h3>The architecture</h3><p>Putting the pieces together:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gFP-pclbav6Kreex-KyHbQ.png" /></figure><p>The important architectural decision is that the enforcement surface is not the policy engine. The policy and PDP define and evaluate authorization once. The hook, MCP gateway, or eventually an endpoint/runtime sensor are simply different places from which normalized security facts enter the same decision system.</p><p>That separation is what makes the model potentially agent-agnostic. If the policy logic were coupled to Claude Code, adding another agent would mean rebuilding the authorization model. That isn’t the architecture I want.</p><h3>Policy Decision Records: making decisions reproducible</h3><p>A security decision is much more useful when it can be explained and reproduced.</p><p>Every decision produces a Policy Decision Record containing information such as:</p><pre>principal<br>agent<br>action<br>resource<br>facts<br>matched rules<br>reasons<br>session evidence<br>policy version<br>engine version<br>decision</pre><p>That gives the system an important property: “why was this blocked?” has a deterministic answer. It also makes policy changes testable. Instead of change policy → deploy → hope, historical decisions can be replayed against a candidate policy:</p><pre>historical PDRs<br>      ↓<br>candidate policy<br>      ↓<br>replay<br>      ↓<br>stricter / looser decisions<br>      ↓<br>review<br>      ↓<br>deploy</pre><p>That turns policy changes into something that can be evaluated before enforcement rather than something that has to be discovered in production.</p><h3>The adoption problem: security that talks too much gets removed</h3><p>This might be the most important engineering lesson in the entire project.</p><p>The most interesting test wasn’t a sophisticated simulated attack. It was 23 ordinary developer actions producing zero interruptions.</p><p>A security control that constantly interrupts normal work gets disabled by the people it was supposed to protect.</p><blockquote><em>Security friction needs to be treated as an engineering metric.</em></blockquote><p>The goal isn’t to block as much as possible — it’s to block what matters while remaining invisible for normal work.</p><p>That means a good policy engine needs to understand the difference between rm -rf ./build and rm -rf / even though both are local destructive commands. The important context isn&#39;t just environment = local — it includes the scope of the resource being affected. That is why resource resolution became part of the enforcement path.</p><h3>The persistent PDP</h3><p>The first implementation was a per-request Python process. That worked, but the overhead was unnecessary.</p><p>Version 2.1 moved the hot path to a persistent PDP runtime:</p><pre>Hook<br>  ↓<br>Unix socket<br>  ↓<br>Persistent PDP<br>  ↓<br>Decision<br>  ↓<br>PDR</pre><p>The result: cold path 83 ms, warm path 47 ms. The improvement came from keeping the policy, session state, resource mappings, and engine loaded rather than rebuilding them for every request.</p><p>But the daemon isn’t the important architectural change — it’s a runtime optimization, not the policy plane. The policy semantics are identical with or without it. There’s also graceful degradation: if the daemon isn’t available, the hook falls back to the in-process decision path, with tests verifying that the two paths produce equivalent decisions. A performance optimization should never silently become a security dependency.</p><h3>The next question: MCP</h3><p>This is where it’s tempting to immediately build an MCP gateway. I’m deliberately not treating it as the obvious next feature. MCP is the next experiment.</p><p>The question isn’t “can we build an MCP security gateway?” — there are already systems working on that problem. The more interesting question is whether the same contextual authorization model can govern a remote MCP invocation without changing the policy semantics underneath it. That’s a much stronger test of the architecture.</p><p>Suppose Claude Code currently produces:</p><pre>delete production database<br>        ↓<br>PDP<br>        ↓<br>DENY</pre><p>Can an MCP invocation representing the same logical operation produce:</p><pre>delete production database<br>        ↓<br>MCP adapter<br>        ↓<br>same PDP<br>        ↓<br>DENY</pre><p>without creating an MCP-specific policy language? If it can, the enforcement surface is genuinely separate from the policy plane. If it can’t, we’ve discovered that the model wasn’t as surface-neutral as we thought.</p><h3>Measuring adaptability instead of claiming it</h3><p>“Agent-agnostic” is easy to say. It is harder to demonstrate. So I want to measure it.</p><p>One proposed metric is a Policy Adaptability Ratio (PAR):</p><pre>PAR =<br>scenarios whose policy survives unchanged<br>──────────────────────────────────────────<br>total scenarios</pre><p>For example, if we take 100 authorization scenarios and 94 can move from the Claude Code hook to an MCP enforcement point without changing the policy model, PAR = 94%.</p><p>I’d also measure three narrower properties separately: <strong>policy portability</strong> (can the same policy execute on the new surface?), <strong>fact portability</strong> (can the new surface produce equivalent security facts?), and <strong>decision equivalence</strong> (does the same logical scenario produce the same authorization decision?). Together, these turn “surface-independent” from an architectural claim into something that can actually be measured — and potentially disproved.</p><h3>Where this leaves the project</h3><p>This isn’t an attempt to build another AI firewall. The more interesting question is whether authorization itself needs to evolve.</p><p>We’ve spent decades asking whether a principal can perform an action. Autonomous agents force a harder question: should this agent perform this action, against this resource, with this data, in this environment, given everything that has happened in this session?</p><p>That changes what the authorization system needs to understand. Identity becomes one input. The action becomes one input. Resource sensitivity, data lineage, session history, runtime telemetry — each becomes one input. The authorization decision becomes the point where those signals meet:</p><pre>Identity<br>                    │<br>Action ─────────────┤<br>Resource ───────────┤<br>Data ───────────────┤<br>Session ────────────┤<br>Environment ────────┤<br>Telemetry ──────────┤<br>                    ↓<br>             Contextual PDP<br>                    ↓<br>          ┌─────────┼─────────┐<br>          ↓         ↓         ↓<br>        ALLOW    ESCALATE    DENY</pre><p>The goal isn’t to predict whether an agent is malicious. It is to make the authorization decision contextual, explainable, reproducible, and enforceable.</p><p>The next experiment is deliberately narrow: move the same policy from the Claude Code hook to MCP and measure how much of the authorization model survives unchanged. If it does, the policy plane is genuinely portable. If it doesn’t, we’ve found another boundary that needs to be solved. Either result is useful.</p><p>Because the real question isn’t whether an agent can do something….</p><blockquote>The engine, the hook, and the policy language described throughout this post are on GitHub: <a href="https://github.com/ihrishikesh0896/contextual-authorization"><strong>github.com/ihrishikesh0896/contextual-authorization</strong></a>. It’s still very much in development — the reasoning model, the trust boundary, and the daemon are all there and tested, but the next thing I’m exploring is blast radius: not just whether a single action should be allowed, but how far its consequences could actually reach once it is. Right now the model reasons about a request and a session; it doesn’t yet reason about downstream impact.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=003c05d465d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mutual TLS?]]></title>
            <link>https://ihrishikeshnate.medium.com/mutual-tls-4167fe5d1d16?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/4167fe5d1d16</guid>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Wed, 14 Jan 2026 16:44:20 GMT</pubDate>
            <atom:updated>2026-01-14T16:44:20.812Z</atom:updated>
            <content:encoded><![CDATA[<p>Mutual TLS (mTLS) is an extension of the conventional TLS (Transport Layer Security) protocol that enables secure communication over the Internet. While TLS generally requires the client to validate the server’s identity using its TLS certificate, mTLS goes a step further by requiring both the client and server to authenticate each other’s identities via certificates. This mutual authentication guarantees that both parties are who they claim to be.</p><figure><img alt="https://images.app.goo.gl/ngBjGCF1By6GnDjJA" src="https://cdn-images-1.medium.com/max/1024/1*J_solr0EddTkWo53tb8zTw.png" /></figure><h3>How Mutual TLS Works:</h3><ol><li>Mutual TLS starts with a regular TLS handshake. The client makes a request to the server to initiate a secure communications connection.</li><li>Server Certificate Presentation: The server displays its TLS certificate to the client. The client checks the server’s certificate against a list of trusted Certificate Authorities (CAs) to validate its authenticity.</li><li>Client Certificate Request: In a mTLS configuration, the server requests a certificate from the client, which reverses the typical one-way authentication mechanism.</li><li>Client Certificate Presentation: The client displays its TLS certificate to the server. Just as the client validated the server’s certificate, the server now checks the client’s certificate against its list of trustworthy CAs.</li><li>Session Encryption: Once the client and server have properly authenticated each other, they create a symmetric encryption key for the session. This key is used to encrypt and decrypt the data transmitted throughout the session, ensuring its confidentiality and integrity.</li></ol><h3><strong>Use Cases for Mutual TLS:</strong></h3><ol><li><strong>Improved Security for B2B Communications: </strong>mTLS is especially beneficial in business-to-business (B2B) settings that require a secure, authenticated connection.</li><li><strong>API Security</strong>: For APIs that require high levels of security, mTLS can ensure that only authenticated clients have access to the API, preventing unwanted access.</li><li><strong>Regulatory Compliance: </strong>In industries with stringent regulatory requirements, mTLS can assist enterprises in meeting data security and privacy regulations.</li><li><strong>IoT Security:</strong> In Internet of Things (IoT) ecosystems, where devices must securely connect with servers and one another, mTLS provides a way to ensure that all communications are authenticated and encrypted.</li></ol><h3>Advantages of Mutual <strong>TLS</strong>:</h3><ol><li><strong>Improved authentication</strong>: mTLS requires both parties to produce and validate certificates, resulting in stronger mutual authentication.</li><li><strong>Increased protection: </strong>mTLS provides an additional layer of protection, making it more difficult for unauthorized parties to intercept or interfere with transmission.</li><li><strong>Trustworthiness:</strong> Using certificates issued by reputable CAs ensures that both the client and server’s identities are validated, which increases the communication channel’s trustworthiness.</li><li><strong>Certificate Management:</strong> mTLS involves careful management of certificates, including issuance, renewal, and revocation, which can be complicated and resource-intensive.</li><li><strong>Performance: </strong>The extra steps necessary in mTLS can add latency to the formation of secure connections, however, this is often modest with modern hardware and software optimizations.</li></ol><p>In summary, mutual TLS is a powerful protocol addition that improves communication security by requiring both clients and servers to authenticate each other, making it an excellent choice for scenarios needing high security and trust.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4167fe5d1d16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unleashing Python’s Power: Mastering Multi-Processing and Multi-Threading]]></title>
            <link>https://ihrishikeshnate.medium.com/unleashing-pythons-power-mastering-multi-processing-and-multi-threading-ab35f55b32d2?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab35f55b32d2</guid>
            <category><![CDATA[multiprocessing-in-python]]></category>
            <category><![CDATA[threading]]></category>
            <category><![CDATA[multithreading-in-python]]></category>
            <category><![CDATA[processing]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Sun, 20 Oct 2024 05:02:20 GMT</pubDate>
            <atom:updated>2024-10-20T05:02:20.185Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cREBd-aUa0kAvP2qr13T-A.png" /></figure><p>As a Python developer, have you ever found yourself staring at a progress bar, wishing your code could run faster? Or perhaps you’ve built an application that works great with small datasets but crawls to a halt when faced with real-world data? If so, you’re not alone. Many developers find themselves in this position, especially when dealing with high workloads, computationally expensive tasks, or I/O-bound operations.</p><p>But fear not! Python has two powerful tools in its arsenal that can help you break through these performance bottlenecks: <strong>multi-threading</strong> and <strong>multi-processin</strong>g. This article will dive deep into these concepts, exploring their differences, use cases, and performance implications. By the end, you’ll have a solid understanding of when and how to use each technique, complete with hands-on Python examples and performance analyses.</p><h4><strong>The Power Duo: Multi-Threading and Multi-Processing</strong></h4><p>Before we dive into the code, let’s break down what these terms mean:</p><h4>Multi-Threading: The Juggler</h4><p>Imagine a juggler keeping multiple balls in the air. That’s essentially what multi-threading does. It creates numerous threads (smaller units of a process) within a single process, all sharing the same memory space. These threads run concurrently, with the Python interpreter acting as the juggler, deciding which thread to run at any moment.</p><p>However, there’s a catch. In Python, we have something called the **Global Interpreter Lock (GIL). Think of the GIL as a strict rule that only one ball can be touched at a time. This means that for CPU-bound tasks, threads can’t truly run in parallel.</p><h4>Multi-Processing: The Team of Jugglers</h4><p>Now, imagine a team of jugglers, each with their own set of balls. That’s multi-processing. It creates separate processes, each with its own Python interpreter and memory space. Each process can run on its CPU core, achieving true parallelism.</p><h4>Choosing Your Champion: When to Use What</h4><p>So, when should you reach for multi-threading, and when is multi-processing the better choice? Here’s a handy guide:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hoXsKtwL9RYIP9otFaLcCA.png" /></figure><h4>Hands-On: Let’s Write Some Code!</h4><p>The theory is great, but nothing beats hands-on experience. Let’s dive into some real Python code to see these concepts in action.</p><h4>Scenario 1: The Prime Number Cruncher (CPU-bound task)</h4><p>First, let’s tackle a CPU-intensive task: finding prime numbers. We’ll compare sequential, multi-threaded, and multi-processing approaches.</p><pre>import time<br>import math<br>from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor<br><br><br>def is_prime(n):<br>    if n &lt;= 1:<br>        return False<br>    for i in range(2, int(math.sqrt(n)) + 1):<br>        if n % i == 0:<br>            return False<br>    return True<br><br><br>def calculate_primes(start, end):<br>    return [n for n in range(start, end) if is_prime(n)]<br><br><br>def run_benchmark(func, start, end, num_chunks):<br>    start_time = time.time()<br>    func(start, end, num_chunks)<br>    return time.time() - start_time<br><br><br>def sequential_execution(start, end, num_chunks):<br>    chunk_size = (end - start) // num_chunks<br>    for i in range(num_chunks):<br>        calculate_primes(start + i * chunk_size, start + (i + 1) * chunk_size)<br><br><br>def multi_threaded_execution(start, end, num_chunks):<br>    with ThreadPoolExecutor(max_workers=num_chunks) as executor:<br>        chunk_size = (end - start) // num_chunks<br>        executor.map(calculate_primes,<br>                     [start + i * chunk_size for i in range(num_chunks)],<br>                     [start + (i + 1) * chunk_size for i in range(num_chunks)])<br><br><br>def multi_processing_execution(start, end, num_chunks):<br>    with ProcessPoolExecutor(max_workers=num_chunks) as executor:<br>        chunk_size = (end - start) // num_chunks<br>        executor.map(calculate_primes,<br>                     [start + i * chunk_size for i in range(num_chunks)],<br>                     [start + (i + 1) * chunk_size for i in range(num_chunks)])<br><br><br>if __name__ == &quot;__main__&quot;:<br>    start, end = 10_000, 100_000<br>    num_chunks = 4<br><br>    sequential_time = run_benchmark(sequential_execution, start, end, num_chunks)<br>    print(f&quot;Sequential execution took {sequential_time:.2f} seconds&quot;)<br><br>    threaded_time = run_benchmark(multi_threaded_execution, start, end, num_chunks)<br>    print(f&quot;Multi-threading execution took {threaded_time:.2f} seconds&quot;)<br><br>    processing_time = run_benchmark(multi_processing_execution, start, end, num_chunks)<br>    print(f&quot;Multi-processing execution took {processing_time:.2f} seconds&quot;)<br><br>    print(f&quot;\nMulti-threading speedup: {sequential_time / threaded_time:.2f}x&quot;)<br>    print(f&quot;Multi-processing speedup: {sequential_time / processing_time:.2f}x&quot;)</pre><p>When you run this code, you might see output like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*Ee361bhLFp5bb2GYJUhIGw.png" /></figure><h4>What’s happening here?</h4><p>For this CPU-bound task, multi-processing shines, offering a significant speedup. Multi-threading, constrained by the GIL, barely improves over the sequential version.</p><h4>Scenario 2: The Web Scraper (I/O-bound task)</h4><p>Now, let’s switch gears to an I/O-bound task: making multiple web requests.</p><pre>import requests<br>import time<br>from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor<br><br><br>def fetch_https://medium.com/url(url):<br>    response = requests.get(url)<br>    return response.status_code<br><br><br>def run_benchmark(func, urls):<br>    start_time = time.time()<br>    func(urls)<br>    return time.time() - start_time<br><br><br>def multi_threaded_scraping(urls):<br>    with ThreadPoolExecutor(max_workers=len(urls)) as executor:<br>        executor.map(fetch_url, urls)<br><br><br>def multi_processing_scraping(urls):<br>    with ProcessPoolExecutor(max_workers=len(urls)) as executor:<br>        executor.map(fetch_url, urls)<br><br><br>if __name__ == &quot;__main__&quot;:<br>    urls = [&#39;https://example.com&#39;] * 100<br><br>    threaded_time = run_benchmark(multi_threaded_scraping, urls)<br>    print(f&quot;Multi-threading (I/O-bound) execution took {threaded_time:.2f} seconds&quot;)<br><br>    processing_time = run_benchmark(multi_processing_scraping, urls)<br>    print(f&quot;Multi-processing (I/O-bound) execution took {processing_time:.2f} seconds&quot;)<br><br>    print(f&quot;\nMulti-threading efficiency: {processing_time / threaded_time:.2f}x faster than multi-processing&quot;)</pre><p>Running this might give you output like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*9_jHFlRN8CgkG2eXyJfgKA.png" /></figure><h4>What’s the story here?</h4><p>For I/O-bound tasks, multi-threading takes the crown. It efficiently manages multiple I/O operations, while multi-processing suffers from the overhead of creating separate processes.</p><h3>The Takeaway: Best Practices for Pythonic Concurrency</h3><p>After diving into these examples, here are some key takeaways to guide your concurrent programming journey:</p><ol><li>Know Your Task: Is it CPU-bound or I/O-bound? This is crucial in choosing between multi-threading and multi-processing.</li><li>Leverage High-Level APIs: Use `concurrent.futures` for a consistent interface to both threading and multiprocessing.</li><li>Consider Hybrid Approaches: Some complex applications might benefit from using both multi-threading and multi-processing where appropriate.</li><li>Monitor Resource Usage: Keep an eye on CPU and memory consumption to ensure you’re not overloading your system.</li><li>Handle Exceptions Gracefully: Concurrent code can fail silently if not properly handled. Always implement robust error handling.</li><li>Use Thread-Safe Data Structures: When multi-threading, ensure you’re using thread-safe data structures or implement proper synchronization.</li><li>Always Benchmark: Don’t assume concurrency will always improve performance. Benchmark your concurrent implementations against sequential versions.</li></ol><h3>Conclusion: Unleash the Full Power of Python</h3><p>By mastering multi-threading and multi-processing, you’re unlocking Python’s full potential. You’ll be able to build applications that can handle heavy workloads, crunch through data faster, and respond more quickly to I/O operations.</p><p>Remember, there’s no one-size-fits-all solution. The key is understanding your specific use case and choosing the right tool for the job. With the knowledge and examples provided in this article, you’re now equipped to make informed decisions and write more efficient, scalable Python code.</p><p>So go forth and conquer those performance bottlenecks! Your Python applications are about to get a serious speed boost.</p><blockquote><strong>About the Author</strong>: <a href="https://medium.com/u/d62f1e096a72">i.hrishikesh nate</a> is a Python enthusiast and Security Reasearcher with a passion for breaking, building, optimizing code and solving complex problems. When not diving into the intricacies of concurrent programming, he can be found procrastinating.</blockquote><blockquote><strong>if you found this article helpful, don’t forget to give it a clap and share it with your fellow Python developers. Happy coding!</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab35f55b32d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CKA: Journey to DevSecOps]]></title>
            <link>https://ihrishikeshnate.medium.com/cka-journey-to-devsecops-03ed94e5948c?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/03ed94e5948c</guid>
            <category><![CDATA[cka]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[linux-foundation]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[cka-exam]]></category>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Sat, 28 Sep 2024 16:57:47 GMT</pubDate>
            <atom:updated>2024-09-28T16:57:47.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9osiziR52zHJ8Zf9L-ZStA.jpeg" /></figure><p>As a full-time AppSec engineer, I wondered how to get my skills into secure development practices. I have been pursuing my interest in Kubernetes for the past year in order to improve my DevSecOps skills. As having the skillset in each domain helps maintain the overall security posture of the application. I will discuss my experiences and learnings I had along the route in this blog post.</p><p>Let&#39;s start…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F5zf2M4HgjjWszLd4a5%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExdDR2ZTZzaDlzMXB4cG9kOXRweXVjYjg1NjBjczN3MjN1N3k3cGtjbCZlcD12MV9naWZzX3NlYXJjaCZjdD1n%2F5zf2M4HgjjWszLd4a5%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExODdrMWQwcm1oNjczYjFwa3lyZHlsOWtnczAwYnAyaGg2ajhjcHo2YyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F5zf2M4HgjjWszLd4a5%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="183" frameborder="0" scrolling="no"><a href="https://medium.com/media/36b470d51f1ca3152b6eaccbc0ed0858/href">https://medium.com/media/36b470d51f1ca3152b6eaccbc0ed0858/href</a></iframe><p>Why <a href="https://kubernetes.io/docs/concepts/overview/">Kubernetes</a>?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FFEBDBbLFT9px3da0vT%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcnpsd2tnZjRubXZhOHR4NjNtMmdoZGt3ajJoMHdjeHkydG4zMThybyZlcD12MV9naWZzX3NlYXJjaCZjdD1n%2FFEBDBbLFT9px3da0vT%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExeTM5bnVmb285aG1iM2t1dTNtajNraXBwbWw2bnYwZ3Z3eWl6Z2pmdSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FFEBDBbLFT9px3da0vT%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a161ee2872ed3eaa2a844d56d3baf0a/href">https://medium.com/media/3a161ee2872ed3eaa2a844d56d3baf0a/href</a></iframe><p>So here it begins</p><p><a href="https://kubernetes.io/docs/concepts/overview/">Kubernetes</a> is a portable, extensible, open source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.</p><p>The following are main ideas that encapsulate the reasons behind Kubernetes widespread adoption:</p><ol><li><strong>Container orchestratio</strong>n: This technology automates the administration, scalability, and deployment of applications inside containers.</li><li><strong>Scalability</strong>: Adapts readily to changing demand levels without causing a disruption in service.</li><li><strong>Self-Healing</strong>: To preserve service continuity, it automatically swaps out failing containers.</li><li><strong>Automated Rollouts/Rollbacks</strong>: Facilitates smooth updates and quick rollbacks to previous versions if necessary.</li><li><strong>Load balancing and service discovery</strong>: Controls traffic to containers by utilizing either their IP addresses or DNS names.</li><li><strong>Secret Management</strong>: securely manages and keeps private configuration information.</li></ol><p>Here are the resources and tips that I used to study that required to become CKA .</p><p><a href="https://kubernetes.io/docs/concepts/overview/">Official Kuberenetes Docs </a>— can be used in the exam, so be very comfortable using the documentation — To search for specific topics.</p><p>Focus on writing imperative commands to save up time.</p><p>Be comfortable copying snippets from the official documents for declarative commands.</p><h4>What is a Declarative command?</h4><blockquote>Systems such as Kubernetes allow you to use configuration files and declarative instructions to define the intended state of your system.</blockquote><blockquote>Kubernetes automatically maintains the state of the system according to your standards, based on the description you provide.</blockquote><blockquote>By continuously monitoring and changing the system to preserve the desired state, this technique improves resilience, simplifies management, and increases consistency.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528171%252C%2B184%252C%2B195%252C%2B1%2529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D12px%26ph%3D10px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3DapiVersion%25253A%252520apps%25252Fv1%25250Akind%25253A%252520Deployment%25250Ametadata%25253A%25250A%252520%252520name%25253A%252520nginx-deployment%25250Aspec%25253A%25250A%252520%252520selector%25253A%25250A%252520%252520%252520%252520matchLabels%25253A%25250A%252520%252520%252520%252520%252520%252520app%25253A%252520nginx%25250A%252520%252520minReadySeconds%25253A%2525205%25250A%252520%252520template%25253A%25250A%252520%252520%252520%252520metadata%25253A%25250A%252520%252520%252520%252520%252520%252520labels%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520app%25253A%252520nginx%25250A%252520%252520%252520%252520spec%25253A%25250A%252520%252520%252520%252520%252520%252520containers%25253A%25250A%252520%252520%252520%252520%252520%252520-%252520name%25253A%252520nginx%25250A%252520%252520%252520%252520%252520%252520%252520%252520image%25253A%252520nginx%25253A1.14.2%25250A%252520%252520%252520%252520%252520%252520%252520%252520ports%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520-%252520containerPort%25253A%25252080&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528171%25252C%2B184%25252C%2B195%25252C%2B1%252529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D12px%26ph%3D10px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3DapiVersion%2525253A%25252520apps%2525252Fv1%2525250Akind%2525253A%25252520Deployment%2525250Ametadata%2525253A%2525250A%25252520%25252520name%2525253A%25252520nginx-deployment%2525250Aspec%2525253A%2525250A%25252520%25252520selector%2525253A%2525250A%25252520%25252520%25252520%25252520matchLabels%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520app%2525253A%25252520nginx%2525250A%25252520%25252520minReadySeconds%2525253A%252525205%2525250A%25252520%25252520template%2525253A%2525250A%25252520%25252520%25252520%25252520metadata%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520labels%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520app%2525253A%25252520nginx%2525250A%25252520%25252520%25252520%25252520spec%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520containers%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520-%25252520name%2525253A%25252520nginx%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520image%2525253A%25252520nginx%2525253A1.14.2%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520ports%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520-%25252520containerPort%2525253A%2525252080&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/38e869b9a1e667f054700f535730d395/href">https://medium.com/media/38e869b9a1e667f054700f535730d395/href</a></iframe><p>Autocomplete can help you gain speed — here’s the git link</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5009968a24ee748374fcead9ca563516/href">https://medium.com/media/5009968a24ee748374fcead9ca563516/href</a></iframe><p><a href="https://www.linuxfoundation.org/">Linux Foundation</a> on purchase, provides access to killer.sh {similar to real lab environment }, which you should only access when you are prepared.</p><p><a href="https://killercoda.com/">Killercoda</a> — offers free labs to practice, but it a has a single scenario per lab kind of interesting to practise a single concept.</p><p>Rest best course to learn from <a href="https://identity.kodekloud.com/sign-in">kodeKloud</a>, the entire course is designed to get all the things you need to prepare — they have a roadmap that gets you started from</p><p>Linix basics — Docker — Kuberenets Begineers — CKA Preparation — MOCK exams</p><p>Cheatsheet : Not maintained or created by me :P, found during my research</p><p><a href="https://www.notion.so/Kubernetes-921c080c33d9487b86d10e77bdabf48c">https://www.notion.so/Kubernetes-921c080c33d9487b86d10e77bdabf48c</a></p><p>Verify my Badge here..</p><p><a href="https://www.credly.com/badges/b886dee6-a596-42a7-8dd3-278ba2cb8f1c">CKA: Certified Kubernetes Administrator was issued by The Linux Foundation to Hrishikesh Nate.</a></p><p>Adios Folks</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl1J3CbFgn5o7DGRuE%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl1J3CbFgn5o7DGRuE%2Fgiphy.gif%3Fcid%3Decf05e47nwk8pr60rhahbuthpx19da26srajv4a7hsw1p0m3%26ep%3Dv1_gifs_search%26rid%3Dgiphy.gif%26ct%3Dg&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExOW93dWdiZ2N1amdpdGo2dHY2NW1vb3lyamE0MmRjaGd5NmNtMTkydiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2Fl1J3CbFgn5o7DGRuE%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="278" frameborder="0" scrolling="no"><a href="https://medium.com/media/802af297200297e8105eed4c2e94341f/href">https://medium.com/media/802af297200297e8105eed4c2e94341f/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03ed94e5948c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Complete Overview of SSH: From Basics to Advanced]]></title>
            <link>https://ihrishikeshnate.medium.com/the-complete-guide-to-ssh-from-basics-to-advanced-7234e574aef4?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/7234e574aef4</guid>
            <category><![CDATA[ssh-keygen]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[sshd]]></category>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Wed, 21 Jun 2023 05:39:00 GMT</pubDate>
            <atom:updated>2023-06-21T05:41:48.020Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*8ebQwZcMBgsZ6prLW8p-HA.png" /></figure><p>Overview of SSH (Secure Shell) from basics to advanced concepts.</p><p>1. Basics:<br> — SSH is a network protocol that allows secure remote access to systems over an unsecured network.<br> — It provides encryption and authentication mechanisms to protect data during transmission.<br> — SSH uses a client-server model, where the client connects to the server and establishes a secure channel for communication.<br> — By default, SSH operates on TCP port 22.</p><p>2. Key Concepts:<br> — Public-key cryptography: SSH uses public-key cryptography to authenticate and establish secure connections.<br> — Public key: A key pair consists of a public key and a private key. The public key is stored on the server and the private key is kept securely by the client.<br> — Authentication: SSH supports different authentication methods, such as password-based authentication and public key authentication.<br> — SSH daemon: The SSH server process running on the remote system that listens for incoming SSH connections.<br> — SSH client: The program used to initiate an SSH connection to a remote server.</p><p>3. Connecting to a Remote Server:<br> — To connect to a remote server, you need an SSH client installed on your local machine.<br> — On Linux and macOS, you can use the built-in OpenSSH client. On Windows, popular clients include PuTTY and OpenSSH for Windows.<br> — To establish a connection, use the command `ssh username@hostname` in the terminal, where `username` is your username on the remote server and `hostname` is the IP address or domain name of the server.</p><p>4. Public Key Authentication:<br> — Public key authentication is more secure and convenient than password-based authentication.<br> — Generate an SSH key pair using the `ssh-keygen` command.<br> — The public key (`id_rsa.pub`) is added to the server’s `~/.ssh/authorized_keys` file, while the private key (`id_rsa`) is kept on the client machine.<br> — When connecting, the client signs a challenge from the server with its private key, and the server verifies it using the stored public key.</p><p>5. Advanced SSH Features:<br> — SSH tunneling/port forwarding: Allows secure access to remote services by forwarding ports through an SSH connection.<br> — ProxyJump/JumpHost: Connect to a remote server via an intermediate “jump host” or “bastion host.”<br> — SSH agent: A program that holds private keys in memory, allowing seamless authentication to multiple servers without re-entering passwords or passphrases.<br> — SFTP (SSH File Transfer Protocol): Securely transfer files between systems using the SSH protocol.<br> — X11 forwarding: Forward graphical applications from the server to the client machine.</p><p>6. Security Considerations:<br> — Keep your SSH client and server software up to date to benefit from security patches.<br> — Disable password-based authentication and rely on public key authentication.<br> — Configure SSH to listen on non-standard ports to avoid automated scanning.<br> — Protect your private key with a strong passphrase.<br> — Use firewall rules to restrict SSH access to trusted networks.</p><p>Remember that this is just an overview of SSH, and there are many more advanced topics and configurations available. It’s always recommended to refer to official documentation and resources for detailed instructions and best practices.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7234e574aef4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Export command! explained...]]></title>
            <link>https://ihrishikeshnate.medium.com/export-command-explained-5284671973a9?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/5284671973a9</guid>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[basics]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 07:31:46 GMT</pubDate>
            <atom:updated>2023-06-14T07:31:46.338Z</atom:updated>
            <content:encoded><![CDATA[<p>The export command in various operating systems allows you to set environment variables or make them available to child processes. The specifics of the export command can vary slightly depending on the operating system you are using. Here&#39;s an explanation of how the export command works in different environments:</p><p>Remember that environment variables set using export or set are specific to the current session and its child processes. To make the changes persistent or affect the entire system, you may need to modify system configuration files or use other mechanisms provided by the respective operating systems.</p><p>It’s important to note that the export the command may have different behaviors and usage in specific shells or scripting languages. Always refer to the documentation or man pages of your specific environment for accurate and detailed information.</p><p><em>Originally published at </em><a href="https://swamp-appliance-ae2.notion.site/Export-command-explained-f16f844fa552428baec9bffc071b09a1?pvs=4"><em>https://swamp-appliance-ae2.notion.site</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5284671973a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Docker: Part2 | Cheatsheet]]></title>
            <link>https://ihrishikeshnate.medium.com/understanding-docker-part2-cheatsheet-4e32e83c9b58?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e32e83c9b58</guid>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[dockerfiles]]></category>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 07:14:56 GMT</pubDate>
            <atom:updated>2023-06-14T07:14:56.823Z</atom:updated>
            <content:encoded><![CDATA[<p>Here are some commonly used Docker commands along with examples:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kwBv0O1850z8YJ6rARht4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3EtRk2K2yFCW3IIMkBIOrg.png" /></figure><p>These are just a few examples of the many Docker commands available. You can explore more commands and their options in the Docker documentation to further expand your Docker knowledge and usage.</p><p>Source: <a href="https://docs.docker.com/get-started/">https://docs.docker.com/get-started/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e32e83c9b58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Docker: Part 1 | Basics]]></title>
            <link>https://ihrishikeshnate.medium.com/understanding-docker-part-1-basics-e296fc25f849?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/e296fc25f849</guid>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 06:50:04 GMT</pubDate>
            <atom:updated>2023-06-14T06:50:39.354Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3EtRk2K2yFCW3IIMkBIOrg.png" /></figure><p>Docker is an open-source platform that allows you to automate the deployment, scaling, and management of applications using containerization. Containers provide an isolated and lightweight environment for running applications, making it easier to package and distribute software across different systems. Here’s a step-by-step overview of Docker from start to end:</p><p>1. Installation:<br> — To begin using Docker, you need to install the Docker Engine on your system. Docker supports various operating systems like Linux, Windows, and macOS. Visit the Docker website to download and install the appropriate version for your OS.</p><p>2. Images:<br> — Docker uses images as the building blocks for containers. An image is a read-only template that includes everything needed to run an application, such as the code, runtime, libraries, and dependencies. Images are created using Dockerfiles, which are text files containing instructions for building the image.<br> — You can search for existing images on the Docker Hub, a public registry of Docker images. Docker Hub contains a wide range of pre-built images for popular software, including databases, web servers, and programming languages.</p><p>3. Containers:<br> — A container is a runnable instance of an image. It represents an isolated environment where an application can run without interfering with the host system or other containers. Multiple containers can run simultaneously on a single host machine.<br> — You can create a container using the `docker run` command, specifying the image you want to use. Docker will download the image if it doesn’t exist locally and then start the container.<br> — Containers are lightweight and start quickly since they share the host system’s OS kernel. They are also portable, meaning you can run the same container on different machines without worrying about dependencies.</p><p>4. Dockerfile:<br> — Dockerfile is a text file that contains a set of instructions for building a Docker image. It defines the base image, any additional dependencies or packages required, environment variables, and the commands to execute during container initialization.<br> — To build an image from a Dockerfile, you use the `docker build` command. Docker reads the instructions in the Dockerfile and executes them step by step to create a new image.<br> — Building Docker images from Dockerfiles allows you to version control your images and automate the image creation process.</p><p>5. Volumes:<br> — Docker volumes provide a way to persist and share data between containers and the host system. Volumes allow you to store and manage data outside the container’s lifecycle, ensuring data durability and portability.<br> — With volumes, you can mount directories or files from the host machine into the container, or create named volumes that are managed by Docker. This enables you to separate the application’s data from the container itself, making it easier to update or replace containers without affecting the data.</p><p>6. Networking:<br> — Docker provides networking capabilities to enable communication between containers and the external world. By default, containers can communicate with each other using a bridge network created by Docker.<br> — You can also create custom networks to isolate containers or connect them to specific network interfaces on the host machine. Docker supports different network drivers, including bridge, host, overlay, and macvlan, to suit various use cases.</p><p>7. Orchestration:<br> — Docker Swarm and Kubernetes are popular orchestration tools used to manage and scale containerized applications across multiple hosts or clusters.<br> — Docker Swarm is a native clustering and orchestration solution provided by Docker. It allows you to create a swarm of Docker nodes, deploy services across them, and handle scaling and load balancing.<br> — Kubernetes (often abbreviated as K8s) is an open-source container orchestration platform that provides advanced features for managing containerized applications at scale. Kubernetes has a more extensive set of features, including auto-scaling, rolling updates, and service discovery.</p><p>8. Docker Compose</p><p>:<br> — Docker Compose is a tool that simplifies the process of defining and managing multi-container applications. It uses a YAML file to describe the services, networks, and volumes required by your application.<br> — With Docker Compose, you can define the relationships between containers, specify environment variables, mount volumes, and configure networking. It allows you to start and stop the entire application stack with a single command.</p><p>9. Registry:<br> — Docker Registry is a service for storing and distributing Docker images. It can be either a public registry like Docker Hub or a private registry running on your infrastructure. A private registry provides control over image distribution and adds an extra layer of security.</p><p>This overview provides a high-level understanding of Docker from installation to various aspects of containerization. Docker has many more features and advanced configurations available, so it’s recommended to explore the official Docker documentation and tutorials for more in-depth information.</p><p>Source: <a href="https://docs.docker.com/get-started/">https://docs.docker.com/get-started/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e296fc25f849" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Homebrew on M1 chip..!!]]></title>
            <link>https://ihrishikeshnate.medium.com/install-homebrew-on-m1-chip-e5bac71212a2?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5bac71212a2</guid>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Thu, 24 Mar 2022 13:49:52 GMT</pubDate>
            <atom:updated>2022-03-24T13:50:09.816Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*rnbViNdEBbMNSFTk5KwsWw.jpeg" /></figure><h3>What Does Homebrew Do?</h3><p>Homebrew installs <a href="https://formulae.brew.sh/formula/"><strong>the stuff you need</strong></a> that Apple (or your Linux system) didn’t.</p><p><strong>Installation</strong></p><p>Curl the following command to download the script..!! to macOS Terminal or Linux shell prompt.</p><p>/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;</p><p>If it doesn’t work after this try this commands and it would work like magic.</p><pre>cd /opt/homebrew/bin/<br><br>PATH=$PATH:/opt/homebrew/bin<br><br>cd<br><br>touch .zshrc<br><br>echo export PATH=$PATH:/opt/homebrew/bin &gt;&gt; .zshrc</pre><p>By pasting this commands you’ll be editing the path and creating the missing .zshrc file and exporting the path to this new file.</p><p>Now you should be able to use brew for further usage..!!!!</p><p>Happy Coding.!!</p><p>Source: <a href="https://brew.sh/">https://brew.sh/</a></p><p><strong>Disclaimer:</strong></p><p>The information published in this article is only for educational purposes. The content of this article is based on learning and experience. Any misuse of information will not be the responsibility of the author.</p><p>Edits are always welcomed…!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5bac71212a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Identifying Linux Password Hash]]></title>
            <link>https://ihrishikeshnate.medium.com/identifying-linux-password-hash-d43926661986?source=rss-d62f1e096a72------2</link>
            <guid isPermaLink="false">https://medium.com/p/d43926661986</guid>
            <dc:creator><![CDATA[i.hrishikesh nate]]></dc:creator>
            <pubDate>Tue, 26 Jan 2021 19:46:08 GMT</pubDate>
            <atom:updated>2021-01-26T19:50:06.325Z</atom:updated>
            <content:encoded><![CDATA[<p>The basic mechanism of any user account is a pair of username and password associated with that user account that can be used for getting access to a Linux machine.</p><p>The Linux Machine stores password in an encrypted format for the user account with arguments related to the specific user .</p><p>The Encrypted string is more of <strong>hash</strong> value of the user’s password. These credentials are stored in a file called <strong>/etc/shadow </strong>It contains single entry per line for each user listed in <strong>/etc/passwd</strong> file.</p><p>Each entry in /etc/passwd file represents an individual user account and contains following seven fields separated by colons (<strong>:</strong>).</p><p>username : encrypted password : UID : GID : user description : user’s home directory : user’s login shell</p><p><strong>Example of Linux Password Hash:</strong> <strong>$6$iU9KjTeD$5myyo4W7zppTOEdVUeP8</strong></p><p>The anatomy of the hash is defined as <strong>$id$salt$hashed</strong></p><ul><li>$id</li></ul><p>It defines the hashing algorithm used On GNU/Linux.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8c-8-AfwtUsdVapWxzJnKA.png" /></figure><ul><li>$salt</li></ul><p>It defines the salt value .</p><ul><li>$hashed</li></ul><p>It is the combination of salt plus the user password.</p><h3>Disclaimer:</h3><p>The information published in this article is only for educational purposes. The content of this article is based on learning and experience. Any misuse of information will not be the responsibility of the author.</p><p>Edits are always welcomed…!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d43926661986" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>