<?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[Your Everyday Generalist - Medium]]></title>
        <description><![CDATA[This publication is aimed at folks who are interested in growing their career as a software generalist. The content curation varies and talks about old and new things that are coming up everyday. Idea is to share as much as possible by being hands-on. - Medium]]></description>
        <link>https://medium.com/your-everyday-tech-generalist?source=rss----f09975cfd8f0---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Your Everyday Generalist - Medium</title>
            <link>https://medium.com/your-everyday-tech-generalist?source=rss----f09975cfd8f0---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 13:01:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/your-everyday-tech-generalist" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Efficient Golang Testing with Bufconn: Insecure, TLS, and mTLS]]></title>
            <link>https://medium.com/your-everyday-tech-generalist/efficient-golang-testing-with-bufconn-insecure-tls-and-mtls-76e663466c43?source=rss----f09975cfd8f0---4</link>
            <guid isPermaLink="false">https://medium.com/p/76e663466c43</guid>
            <category><![CDATA[grpc-client]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[buf]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[grpc]]></category>
            <dc:creator><![CDATA[GS]]></dc:creator>
            <pubDate>Tue, 07 Mar 2023 04:15:00 GMT</pubDate>
            <atom:updated>2023-03-18T20:35:32.507Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qcnIwvbqN4pHy_k7stF03Q.png" /></figure><p>Are you tired of the time and effort required to set up gRPC connections and free ports for your Golang tests, especially when working on securing your connections with TLS?</p><p>Setting up gRPC and choosing a free port for testing can be time-consuming and error-prone, as port conflicts can easily occur. Additionally, if you’re working on securing your gRPC connections with TLS, it’s essential to ensure that your unit tests are set up efficiently to avoid slowing down your development process and also maintain a high-level of confidence.</p><p>In this context, using <a href="https://pkg.go.dev/google.golang.org/grpc/test/bufconn">Bufconn</a> package in your Golang tests can simplify the process by allowing you to create secure connections in memory. This package implements the <strong><em>net.Conn</em></strong> using an in-memory buffer. This make it easy to not invest in additional test logic to manage unique ports for setting up your gRPC server. Let’s see how we can achieve various client &lt;&gt; server gRPC connection setups in Golang.</p><h3>Example GreetService Proto Definition</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/882274e0dd7e38b3d19c1f246e0f9b8d/href">https://medium.com/media/882274e0dd7e38b3d19c1f246e0f9b8d/href</a></iframe><h3>Example GreetService RPC implementation</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c586d56c3b9429e06508ecda8647e05/href">https://medium.com/media/3c586d56c3b9429e06508ecda8647e05/href</a></iframe><p>In order to setup gRPC TLS tests, we will need to create Root, Intermediate CAs along with Client and Server x.509 certificates. For the rest of the tutorial please assume that we have a <strong><em>testData</em></strong> data structure that holds self-signed Root, Intermediate CA, and also two client and one server x.509 certificates.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/11085dd1a0547f29bbb4e3a7c524fda4/href">https://medium.com/media/11085dd1a0547f29bbb4e3a7c524fda4/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oK7K9tCLKako98l63rENsQ.png" /><figcaption>Sample CA hierarchy created under testData for our tests</figcaption></figure><h3><strong>gRPC Insecure</strong></h3><p>In this mode the gRPC connection is established between client and server without any security measures such as Transport Layer Security (TLS), it is considered insecure because the communication between the client and server is not encrypted or authenticated. This means that anyone who can access the network traffic can potentially eavesdrop on the messages sent between the client and server or even modify them.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5717f05ddd0efa63f5602e1b41d47e69/href">https://medium.com/media/5717f05ddd0efa63f5602e1b41d47e69/href</a></iframe><h3>gRPC TLS</h3><p>In this mode the client and server both authenticate each other using their respective TLS certificates, but only the server is required to present a certificate. The client can verify the server’s certificate to ensure that it is communicating with the intended server and that the server’s certificate is trusted. However, the server does not need to verify the client’s certificate, as it is not necessary to authenticate the client in a one-way TLS connection. This setup is often used in scenarios where the client is unauthenticated or the server does not need to know the client’s identity.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8a110a955f7ae58d6032516488d48ec/href">https://medium.com/media/f8a110a955f7ae58d6032516488d48ec/href</a></iframe><h3>gRPC mTLS</h3><p>In mutual TLS (mTLS) for gRPC, both the client and server authenticate each other by presenting their respective TLS certificates. This provides mutual authentication and helps ensure that both parties can trust each other’s identities. In this setup, the client verifies the server’s certificate and the server verifies the client’s certificate, so that each party knows the identity of the other. This can be useful in scenarios where both the client and server need to authenticate each other, and where the server needs to know the identity of the client before processing any requests.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/84ddaf052289f3481fd16e7bb8b23004/href">https://medium.com/media/84ddaf052289f3481fd16e7bb8b23004/href</a></iframe><p>Here’s the full code <a href="https://github.com/codergs90/grpc-tests-with-bufconn">setup</a> for your reference. The project uses <a href="https://buf.build/">buf</a> to managing proto dependencies and Makefile to simplify triggering tests.</p><p>Please also check out the <a href="https://github.com/codergs90/grpc-tests-with-bufconn/blob/main/test/tls_test.go#L269"><strong><em>Test_GRPC_MTLS_Root_CA_Knowledge</em></strong></a> and <a href="https://github.com/codergs90/grpc-tests-with-bufconn/blob/main/test/tls_test.go#L113"><strong><em>Test_GRPC_TLS_Root_CA_Knowledge</em></strong></a><strong><em> </em></strong>tests, as those are closer to the production way of setting up your client and server TLS configuration. The main idea in these tests is to not require the client or server know about intermediate CAs and instead use the root CA to validate the TLS handshake. The benefit of this approach is that one can rotate client or server intermediate CAs without impacting the overall communication. Usually, as per PKI standards, intermediate CAs have shorter TTLs in comparison to the root TTL.</p><p>That’s it! So we have learned how to setup gRPC and variants of TLS versions. The TLS config structure exposes many other properties that you can tweak and test after as well.</p><p>Thanks for reading! If you found this article helpful, please consider <a href="https://www.buymeacoffee.com/codergs">buying me a coffee</a> to support my work. Thanks again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76e663466c43" width="1" height="1" alt=""><hr><p><a href="https://medium.com/your-everyday-tech-generalist/efficient-golang-testing-with-bufconn-insecure-tls-and-mtls-76e663466c43">Efficient Golang Testing with Bufconn: Insecure, TLS, and mTLS</a> was originally published in <a href="https://medium.com/your-everyday-tech-generalist">Your Everyday Generalist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keybase in CI: Secure software delivery without breaking your bank]]></title>
            <link>https://medium.com/your-everyday-tech-generalist/keybase-in-ci-secure-software-delivery-without-breaking-your-bank-a95dcb674974?source=rss----f09975cfd8f0---4</link>
            <guid isPermaLink="false">https://medium.com/p/a95dcb674974</guid>
            <category><![CDATA[secure]]></category>
            <category><![CDATA[secrets]]></category>
            <category><![CDATA[code-signing]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[keybase]]></category>
            <dc:creator><![CDATA[GS]]></dc:creator>
            <pubDate>Tue, 17 Jan 2023 03:35:23 GMT</pubDate>
            <atom:updated>2023-03-18T20:33:15.175Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5E9w0Zv_8-fXdYNd1CufMQ.png" /></figure><p>I’ve been impressed by <a href="https://keybase.io/">Keybase’s</a> usability and security features as a hobby user. I have mostly utilized it for <a href="https://keybase.io/twinspica90">online identity</a> verification as well as secure messaging and file sharing with friends and family. However, I frequently wondered why it isn’t more frequently taken into account for a variety of use scenarios, such as in the CI/CD pipeline.</p><h3><strong>Signing software in CI/CD</strong></h3><p>Signing software artifacts at build time can greatly enhance the overall security posture of an organization, here’s how:</p><ol><li>By signing an artifact at build time, we can ensure that the artifact has not been tampered with or altered in any way after it was built. This helps to ensure the integrity and authenticity of the artifact, and can be used to detect and prevent malicious attacks such as supply chain attacks.</li><li>Signing the artifact at build time also provides a way to trace the origin of the artifact. This can be useful for troubleshooting and investigations in case of security incidents.</li><li>In addition, signing the artifacts at build time can help to identify the individual or organization who created the artifact, which can be useful for compliance and regulatory purposes.</li><li>By signing and verifying the artifacts at the time of delivery, we can ensure that only authorized parties have access to the artifact and it has not been tampered with during delivery.</li></ol><p>Overall, signing software artifacts at build time is a best practice for enhancing the security posture of an organization and can help to prevent and detect malicious attacks, compliance and regulatory purposes.</p><p>In this article, we will be discussing the steps to create a signing key and paperkey to use in your CI/CD pipeline with Keybase. Keybase is a powerful tool that can be used to sign and verify software artifacts in a cost-efficient and secure way, making it a great solution for smaller to medium-scale companies. So, let’s get started!</p><ol><li>You can <a href="https://keybase.io/download">download and install </a>Keybase from the official website.</li><li>Generate a new paperkey to use for logging in to Keybase from CI/CD</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3915e8ad7b938c15e30120681e74355b/href">https://medium.com/media/3915e8ad7b938c15e30120681e74355b/href</a></iframe><p>3. Generate a new PGP key to digitally sign the software artifacts in CI/CD.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/000d9d6a44eecea1b5fe704d9fc6bb33/href">https://medium.com/media/000d9d6a44eecea1b5fe704d9fc6bb33/href</a></iframe><p>4. Github Action template to sign and verify an artifact and upload to S3.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3080b50a607587153186a31e65ab0460/href">https://medium.com/media/3080b50a607587153186a31e65ab0460/href</a></iframe><p>Note that the sign command is using a `-<strong>d (detached)</strong>` option so that signature is not appended to the original source file. If your use case is ok with appending the signature to the source file, then consider dropping the detached option.</p><h3><strong>Keybase’s KVStore (250GB free)</strong></h3><p>The <a href="https://book.keybase.io/docs/bots">Keybase KVStore</a> is a powerful yet underutilized tool for storing small blobs of sensitive data like configuration settings and API credentials. Its in-built KVStore is easy to use and provides a secure and cost-efficient solution for small blobs of data. The service’s API abstractions are well designed, and it supports multi-tenancy through the use of namespaces, making it easy to organize and manage sensitive data.</p><p>Let’s look at the below example to create, retrieve and delete a KV secret using Keybase CLI on a test namespace <strong>ns1</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/220a97bce2493529344b635d46b9996b/href">https://medium.com/media/220a97bce2493529344b635d46b9996b/href</a></iframe><p>The Keybase KV store offers a unique versioning system for KV entries. All operations are incrementally versioned, and the KVStore intelligently does not display namespaces with null KV entries, as they reflect deleted entries. The team name attribute is noteworthy, as it allows for the creation of multiple teams and the invitation of users to those teams. In the example provided, the KV entries were created on the root user, but it is also possible to create them within <a href="https://keybase.io/blog/introducing-keybase-teams">Keybase teams</a>.</p><h3><strong>Shortcomings</strong></h3><ul><li>The integration relies on basic authentication and lacks access controls, which could pose a security risk if the paperkey is exposed.</li><li>Keybase does not currently support dynamic credentials, and PGP keys must be registered for use beforehand.</li><li>There is no option to specify time-to-live (TTL) values when creating PGP keys.</li><li>While the Keybase APIs for the KV store are useful, a CLI wrapper with commands such as keybase kvstore get &lt;kv_entry&gt; &lt;namespace&gt; would be much smoother experience for the users.</li><li>There is a lack of documentation on API rate limits, making it unclear if the solution will scale as the business grows.</li><li>There is a lack of audit-ability with the Keybase KV store, as there is no way to track when and who accessed or modified the secrets.</li></ul><h3>Highlights</h3><ul><li>Simple to integrate and keeps data secure within the Keybase ecosystem.</li><li>PGP key revocation is very simple which allows for flexibility to break the verification pipeline as soon as it is known that the key is compromised.</li><li>Multi-tenancy via namespaces enable secret management for multiple teams within an organization.</li><li>It’s easy to migrate from Keybase to production-grade tools like HashiCorp Vault, which also support namespaces on enterprise offerings.</li><li>Even if the key is compromised, it has to happen from within the Keybase ecosystem, this allows for downstream services to be patched to not honor the public portion of the PGP keys which can block software deployment.</li></ul><h3><strong>Should you use it?</strong></h3><p>Keybase offers a cost-efficient and secure solution for small to medium-scale companies in CI/CD pipelines. If you are just getting started and are not sure about your needs, Keybase can handle the heavy lifting for your organization. However, it does lack certain features like access controls, dynamic credentials, and audit-ability. Organizations in need of higher security and access control may want to consider alternative solutions in the long term.</p><p>Thanks for reading! If you found this article helpful, please consider <a href="https://www.buymeacoffee.com/codergs">buying me a coffee</a> to support my work. Thanks again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a95dcb674974" width="1" height="1" alt=""><hr><p><a href="https://medium.com/your-everyday-tech-generalist/keybase-in-ci-secure-software-delivery-without-breaking-your-bank-a95dcb674974">Keybase in CI: Secure software delivery without breaking your bank</a> was originally published in <a href="https://medium.com/your-everyday-tech-generalist">Your Everyday Generalist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why mTLS isn’t sufficient these days?]]></title>
            <link>https://medium.com/your-everyday-tech-generalist/why-mtls-isnt-sufficient-these-days-c0a49c792b49?source=rss----f09975cfd8f0---4</link>
            <guid isPermaLink="false">https://medium.com/p/c0a49c792b49</guid>
            <category><![CDATA[tpm]]></category>
            <category><![CDATA[mutual-tls]]></category>
            <category><![CDATA[pki]]></category>
            <dc:creator><![CDATA[GS]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 04:03:05 GMT</pubDate>
            <atom:updated>2023-03-18T20:35:15.016Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*yHkTzb2INgA-F6SqW4Zj1g.png" /><figcaption><a href="https://www.cloudflare.com/learning/access-management/what-is-mutual-tls/">https://www.cloudflare.com/learning/access-management/what-is-mutual-tls/</a></figcaption></figure><p>Distributed systems are made up of many different services that work together to provide a seamless experience for the user. As a user, we often only interact with a small part of the system, such as through a website or app.</p><p>For example, when using the Uber app to request a ride, the user may not realize that there are many different services working behind the scenes to make this happen. These services might include a mapping service to determine the best route for the driver to take, a dispatching service to match the user with a nearby driver, and a payment service to handle the transaction. All of these services come together to provide a smooth and seamless experience for the user, who is simply able to request a ride within the app and wait for the driver to arrive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPNz-RkxgobzNZZG3N-vaw.png" /><figcaption>An abstract mesh of many micro-services interacting with each other in a distributed system</figcaption></figure><p>It is important to ensure that the services in a distributed system have the right security model in place to protect against unauthorized access and potential security breaches. One key aspect of this is authentication, which is the process of verifying that a user or system is who they claim to be. This can be accomplished through the use of username and password combinations, biometric authentication, or other methods.</p><p>Authorization is another important aspect of security in distributed systems. This involves determining what actions a user or system is allowed to perform within the system. For example, in the case of the Uber app, a driver may be authorized to access certain functions within the app related to picking up and dropping off passengers, while a rider may only be authorized to request rides and view their ride history.</p><p>Implementing strong authentication and authorization measures is essential to ensuring the security and integrity of a distributed system and protecting against potential threats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWzcWZpNa_YSPowFQxGPhw.png" /><figcaption>Authentication (AuthN) != Authorization (AuthZ)</figcaption></figure><p>One approach to securing distributed systems is through the use of <a href="https://www.keyfactor.com/resources/what-is-pk"><strong>public key infrastructure (PKI)</strong></a>. PKI uses a combination of public and private keys to enable secure communication using mutual Transport Layer Security (mTLS) over the internet, ensuring that messages are only accessed by the intended recipient. However, the private keys used in PKI can be compromised if they are not properly protected, allowing an attacker to impersonate a user or system and gain unauthorized access to resources or information.</p><h3><strong>Some shortcomings</strong></h3><ol><li>One potential gap in credentialing with PKI is that the private keys used to authenticate and decrypt messages can be compromised if they are not properly protected. If an attacker is able to gain access to a private key, they can potentially impersonate the user or system associated with that key and gain unauthorized access to resources or information.</li><li>PKI credentials will enable strong authentication use cases, but it doesn’t provide Authorization by default.</li></ol><h3><strong>Things we can improve</strong></h3><ol><li>To protect against the exfiltration of private keys, organizations can use <a href="https://learn.microsoft.com/en-us/windows/security/information-protection/tpm/trusted-platform-module-overview"><strong>Trusted Platform Modules (TPMs)</strong></a>. TPMs are specialized chips that provide hardware-based security measures, including the ability to store and manage cryptographic keys. By using TPMs for key storage and management, it is more difficult for an attacker to exfiltrate private keys and impersonate services in a distributed system.</li><li>Incorporate caller attributes into the PKI credential provisioning process (be it manual or automated). If the system requesting the credential can be <a href="https://github.com/google/go-attestation"><strong>remotely attested</strong></a> via an inventory system, then the credential granting process succeeds, or else the request is denied. An outcome of a successful grant will be a digital certificate that captures the properties of the underlying caller (hostname, IP, user, etc.). These properties can later be used in addition to AuthN to check for AuthZ.</li></ol><p>In the real world, establishing defense in depth is more like <strong><em>a relay race</em></strong>. Depending on where you are in the race, you can always start the next leg. It is perfectly fine to not look towards TPM if your risk assessment can be satisfied with short-lived dynamic credentials rooted in strong PKI. If your business demands a better stronghold, then you can also invest in TPM integration to better your overall security for your systems. In addition to all incremental efforts, please do invest heavily in regularly auditing and logging system activity to detect and respond to potential security threats or breaches. Often times, monitoring and alerting are not comprehensive enough to cover the credential provisioning process, which creates a huge security gap.</p><p>Thanks for reading! If you found this article helpful, please consider <a href="https://www.buymeacoffee.com/codergs">buying me a coffee</a> to support my work. Thanks again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0a49c792b49" width="1" height="1" alt=""><hr><p><a href="https://medium.com/your-everyday-tech-generalist/why-mtls-isnt-sufficient-these-days-c0a49c792b49">Why mTLS isn’t sufficient these days?</a> was originally published in <a href="https://medium.com/your-everyday-tech-generalist">Your Everyday Generalist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zero Trust Architecture — what’s the buzzword for?]]></title>
            <link>https://medium.com/your-everyday-tech-generalist/zero-trust-architecture-whats-the-buzzword-for-5f9e3fc6f329?source=rss----f09975cfd8f0---4</link>
            <guid isPermaLink="false">https://medium.com/p/5f9e3fc6f329</guid>
            <category><![CDATA[zero-trust-architecture]]></category>
            <category><![CDATA[zero-trust]]></category>
            <dc:creator><![CDATA[GS]]></dc:creator>
            <pubDate>Fri, 06 Jan 2023 02:55:37 GMT</pubDate>
            <atom:updated>2023-03-18T20:34:42.876Z</atom:updated>
            <content:encoded><![CDATA[<h3>Zero Trust Architecture — what’s the buzzword for?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y5lRyVxN5Ym5YxN7hCpODw.png" /></figure><p>ZTA (Zero Trust Architecture) is a common buzzword these days in the IT industry, where many companies are either trying to explore or define what ZTA means for their corporation or banking on other technology companies to pave the way for adopting Zero Trust.</p><p>At its core, ZTA is a security blueprint or framework based on Zero Trust principles. The NIST paper published in Aug 2020, <a href="https://csrc.nist.gov/publications/detail/sp/800-207/final#pubs-documentation"><strong><em>SP 800–207 Zero Trust Architecture</em></strong></a> defines it as</p><blockquote>Zero trust (ZT) provides a collection of concepts and ideas designed to minimize uncertainty in enforcing accurate, least privilege per-request access decisions in information systems and services in the face of a network viewed as compromised. Zero trust architecture (ZTA) is an enterprise’s cybersecurity plan that utilizes zero trust concepts and encompasses component relationships, workflow planning, and access policies. Therefore, a zero trust enterprise is the network infrastructure (physical and virtual) and operational policies that are in place for an enterprise as a product of a zero trust architecture plan.</blockquote><p>The important thing to remember here is that ZTA implementation will differ from enterprise to enterprise, but ZT principles and core tenants will remain the same overall with the core emphasis on <strong>“never trust, always verify</strong>.<strong>”</strong> The white-paper on<a href="https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWJJdT"> <strong><em>Embrace proactive security with Zero Trust</em></strong></a> by Microsoft is just one of the many out there that shows that ZTA is an evolving concept. There is no single tool that completes the ZTA story; rather, it is a collection of many tools that an organization employs to achieve its ZTA strategy.</p><p>ZT paradigm moves the focus from the traditional network based security efforts (on VPN, inside corporate network etc.) to interactions between users (human/machine) and resources (web application/ micro-services, etc.) via different assets (company machine, BYOD, micro-services etc.). In the above envisioned workflow, one of the most critical aspects is the notion of a strong identity for the users, authentication and authorization. A strong authentication (AuthN) mechanism followed by an adaptive authorization (AuthZ) layer governed by access control policies rooted in ZTA core tenants will shape the success story for your organization’s ZTA vision.</p><p>So next time you hear ZTA, just remember it is conceptual to an extent and differs in implementation on a case-by-case basis.</p><p>Stay up to date:</p><ol><li><a href="https://cloud.google.com/beyondcorp">Google’s BeyondCorp implementation of ZTA</a></li><li><a href="https://www.datocms-assets.com/2885/1666193737-hashicorp_zts_whitepaper.pdf">HashiCorp ZTS</a></li><li><a href="https://instasafe.com/blog/">Zero Trust blog</a></li></ol><p>Thanks for reading! If you found this article helpful, please consider <a href="https://www.buymeacoffee.com/codergs">buying me a coffee</a> to support my work. Thanks again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f9e3fc6f329" width="1" height="1" alt=""><hr><p><a href="https://medium.com/your-everyday-tech-generalist/zero-trust-architecture-whats-the-buzzword-for-5f9e3fc6f329">Zero Trust Architecture — what’s the buzzword for?</a> was originally published in <a href="https://medium.com/your-everyday-tech-generalist">Your Everyday Generalist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple linux hack: Show the IP info on the login screen]]></title>
            <link>https://medium.com/your-everyday-tech-generalist/simple-linux-hack-show-the-ip-info-on-the-login-screen-7313475868d5?source=rss----f09975cfd8f0---4</link>
            <guid isPermaLink="false">https://medium.com/p/7313475868d5</guid>
            <category><![CDATA[ubuntu-20-04]]></category>
            <category><![CDATA[virtualbox]]></category>
            <category><![CDATA[bridge-networks]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[simple-hacks]]></category>
            <dc:creator><![CDATA[GS]]></dc:creator>
            <pubDate>Fri, 01 Jan 2021 00:06:42 GMT</pubDate>
            <atom:updated>2023-03-18T20:34:27.126Z</atom:updated>
            <content:encoded><![CDATA[<h3>Simple linux hack: Show the IP info on the terminal login screen</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qGUSLROEWfowVJyo1TjTxw.png" /></figure><p>I have played with virtual-box VMs a lot in my career, and one thing that always bugged me was not having an easy way to figure out the IP address of my running VM when setup in the bridge networking mode. It was surprising painful to get the IP of the running VM via VBoxManage cli utility (in fact I am not sure even if there’s a way to get it easily for VMs running in the <a href="https://www.linuxbabe.com/virtualbox/a-pretty-good-introduction-to-virtualbox-bridged-networking-mode">bridge networking mode</a>). I often have to SSH into the VM and then run <strong>ip addr show</strong> to get the IP. If you are using SSH config setup from <a href="https://code.visualstudio.com/">VSCode</a>, then this is a painful step at least to me.</p><p>To make my life easier I decided to add the IPv4 information to the login screen (eg; Ubuntu 20 server) so that I know the IP from the get go.</p><p>In order to do so, there are few questions that we need to answer first</p><ol><li>how does login screen gets the text it shows on the terminal?</li><li>how do I update the information at boot time if I figure out 1?</li><li>what all to display?</li></ol><p>A quick search on google hinted below for above questions:</p><ol><li><strong>/etc/issue</strong> may be the file that can be used to display custom information at the login screen.</li></ol><pre><em># From linux man page - </em><a href="https://man7.org/linux/man-pages/man5/issue.5.html">https://man7.org/linux/man-pages/man5/issue.5.html</a><em><br>/etc/issue</em> is a text file which contains a message or system<br>       identification to be printed before the login prompt.  It may<br>       contain various <strong>@</strong><em>char</em> and <strong>\</strong><em>char</em> sequences, if supported by <br>       the <strong>getty</strong>-type program employed on the system.</pre><p>2. <strong>/etc/network/if-up.d/</strong> can be used to trigger a custom script that can get us the IP information to populate on the <strong>/etc/issue</strong>.</p><pre># From <a href="https://manpages.debian.org/testing/ifupdown/interfaces.5.en.html#HOOK_SCRIPTS">https://manpages.debian.org/testing/ifupdown/interfaces.5.en.html#HOOK_SCRIPTS</a></pre><pre><em>/etc/network/if-up.d/</em>Scripts in this directory are run after bringing the interface up.</pre><p>3. since if-up.d gets triggered when interfaces come up, we can invoke linux commands to get IP information and populate it under the <strong>/etc/issue</strong> file.</p><p>With research out of the way, now it’s the time to do some hands on. For the test setup here, I will be using Ubuntu 20.04 LTS image under VirtualBox.</p><p><strong>Goal:</strong> Add Host info + IPv4 address of all interfaces to the login screen.</p><p>For host info we can use <a href="https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/lsbrelease.html"><strong>lsb_release</strong></a> command:</p><pre>$ lsb_release -a<br>No LSB modules are available.<br>Distributor ID: Ubuntu<br>Description:    Ubuntu 20.04 LTS<br>Release:        20.04<br>Codename:       focal</pre><p>For IPv4 address we can use <a href="https://linux.die.net/man/8/ip"><strong>ip</strong></a> command:</p><pre>$ ip -4 -br a<br>lo               UNKNOWN        127.0.0.1/8 <br>enp0s3           UP             192.168.15.24/24</pre><p>Cool, so we have two things we need to proceed. Let’s create a bash script that can help us display above information in a better format and persist to <strong>/etc/issue</strong> file.</p><pre>#!/bin/sh<br>set -e</pre><pre>HOSTINFO=$(/usr/bin/lsb_release -a 2&gt;&amp;1 | grep Description | /usr/bin/cut -d &quot;:&quot; -f2 | /usr/bin/tr -d [:blank:])</pre><pre>IPADDRS=$(/usr/sbin/ip -4 -br a)</pre><pre>/usr/bin/echo -ne &quot;Host OS: $HOSTINFO\n$IPADDRS\n&quot; &gt; /etc/issue</pre><p>With the above custom script we need to hook it up to the network interface bring up phase during linux boot up time. As per <a href="https://netplan.io/faq/"><strong>netplan faq</strong></a>, it seems if your OS uses netplan (which is in my case), then as per below table mapping the scripts qualifying for <strong>if-up.d</strong> should reside under <strong>/etc/networkd-dispatcher/routable.d</strong></p><figure><img alt="Netplan suggests placing post scripts under routable.d" src="https://cdn-images-1.medium.com/max/778/1*JVKrGpkWHYUoQ9HbajvSAQ.png" /><figcaption><a href="https://netplan.io/faq/">netplan</a> suggests placing post-up hook scripts under routable.d instead of if-up.d</figcaption></figure><p>I placed the above custom script under <strong>/etc/networkd-dispatcher/routable.d/add-ip-to-login-screen</strong>. We need to ensure that the script added has executable permissions.</p><pre>$ sudo chmod +x /etc/networkd-dispatcher/routable.d/add-ip-to-login-screen</pre><p>Voila, we are done here. Reboot your VM and you should see the host OS and IPv4 information on your new shiny login screen.</p><p><strong><em>Note: </em></strong><em>the custom script is kinda dumb as it gets triggered on every interface bring up. if you are interested in triggering it only on a specific interface, then just add an if statement like below:</em></p><pre>[ &quot;$IFACE&quot; = &quot;eth0&quot; ] || exit 0</pre><p>Thanks for reading! If you found this article helpful, please consider <a href="https://www.buymeacoffee.com/codergs">buying me a coffee</a> to support my work. Thanks again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7313475868d5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/your-everyday-tech-generalist/simple-linux-hack-show-the-ip-info-on-the-login-screen-7313475868d5">Simple linux hack: Show the IP info on the login screen</a> was originally published in <a href="https://medium.com/your-everyday-tech-generalist">Your Everyday Generalist</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>