<?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"><channel><title><![CDATA[EmpathyOps]]></title><description><![CDATA[We are industry experts that provide a collective 30+ years of technical expertise spanning Edge, Cloud, and Cloud Native with a strong emphasis on Networking a]]></description><link>https://blog.empathyops.io</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1704260140061/DckKYC9Eo.png</url><title>EmpathyOps</title><link>https://blog.empathyops.io</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 17 Oct 2026 09:25:36 GMT</lastBuildDate><atom:link href="https://blog.empathyops.io/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Getting started with Kong Insomnia]]></title><description><![CDATA[Hey folks 👋🏼
For the past week, I had the chance to explore a tool called Insomnia by Kong and thought I'd share my learnings through this blog. So here we go.
Imagine you're a developer, sitting at your desk late at night, surrounded by coffee cup...]]></description><link>https://blog.empathyops.io/getting-started-with-kong-insomnia</link><guid isPermaLink="true">https://blog.empathyops.io/getting-started-with-kong-insomnia</guid><category><![CDATA[APIs]]></category><category><![CDATA[kong]]></category><category><![CDATA[#insomnia]]></category><category><![CDATA[API TESTING]]></category><dc:creator><![CDATA[Aakansha Priya]]></dc:creator><pubDate>Tue, 10 Sep 2024 13:57:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725953365946/e7bdf644-0c07-4820-b5d2-7c37e10669d6.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey folks 👋🏼</p>
<p>For the past week, I had the chance to explore a tool called <a target="_blank" href="https://insomnia.rest/">Insomnia</a> by <a target="_blank" href="https://github.com/Kong/insomnia">Kong</a> and thought I'd share my learnings through this blog. So here we go.</p>
<p>Imagine you're a developer, sitting at your desk late at night, surrounded by coffee cups and lines of code. You've been tasked with integrating a new API, but every time you test it, something goes wrong. The errors are vague, the debugging process is tedious, and you start feeling that familiar frustration creep in - you wonder, <em>Isn’t there an easier way to do this?💭</em></p>
<p>Enter <strong>Insomnia</strong> – but don’t let the name fool you! This isn’t the kind of insomnia that keeps you awake at night; in fact, it’s here to save you from sleepless nights. 🤪</p>
<p>You quickly realize that Insomnia isn't just another API client – it’s a <strong>one-stop shop</strong>. You can <strong>Design, Debug, and Test</strong> APIs all in one go.</p>
<p>No more jumping between different tools to authenticate, debug, and test your requests. With Insomnia’s built-in <strong>authentication helpers</strong>, you can set up OAuth, Basic Auth, or any token-based security in just a few clicks.</p>
<p>You can set up <strong>environment variables</strong> for different stages – from development to production – keeping your workspace organized and neat. No more fumbling around changing URLs manually.</p>
<p>But wait, there’s more: your API isn't live yet, and you need to simulate responses. Not a problem! You use Insomnia to <strong>mock APIs</strong> and simulate server behaviour, allowing you to test without ever having to spin up a backend. With the <strong>real-time collaboration</strong> feature, your entire team can jump in, test, and debug right alongside you.</p>
<p>As you watch your API deliver a smooth "200 OK" ✅ and your tests succeed one after another, you feel a sense of relief and accomplishment. Insomnia isn’t just a tool, it’s your secret weapon against the chaos of API development.</p>
<p>And there's even more! Here are the <strong>storage options</strong> you can use for your projects, collections, specs, and other files:</p>
<ul>
<li><p><strong>Local Vault</strong>: Store your collections, design specs, and other resources locally.</p>
</li>
<li><p><strong>Cloud Sync</strong>: Collaborate in the cloud with end-to-end encryption (E2EE) for free.</p>
</li>
<li><p><strong>Git Sync</strong>: Use any third-party Git repository to store all your files.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724931278190/e24616fb-48e0-4931-8ee5-1fae8b3c1b23.png" alt class="image--center mx-auto" /></p>
<p>So, how do you get started?</p>
<p>Getting started is easy! Insomnia is available for <strong>Mac, Windows, and Linux</strong>, so no matter what platform you’re on, you’re covered. You can download it from their website: <a target="_blank" href="https://insomnia.rest/download">https://insomnia.rest/download</a></p>
<p>We'll be trying Insomnia together 🌱</p>
<p>Now, let's send our first request! 🎊</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724933193730/9dea1687-3ba8-4a16-99b5-59271df062e5.png" alt class="image--center mx-auto" /></p>
<p>Make a new collection by clicking the + icon in the sub-menu named <strong>Collections</strong> and name it <strong>Demo</strong>.</p>
<p>You'll see something like this. Now, let's create a new HTTP request. I've already made an API you can use to test it out :D (but feel free to use any API you like! 😉)</p>
<p>Here's the <a target="_blank" href="https://github.com/priyaaakansha/insomnia_demo">Github repo</a></p>
<p>I've made a basic API that handles signup and login. Here's how it works:</p>
<ol>
<li><p><strong>[GET]</strong> Request to check if the server is running or not.</p>
</li>
<li><p><strong>[POST]</strong> Sign up a new user with a <strong>username</strong> and <strong>password</strong>.</p>
</li>
<li><p><strong>[POST]</strong> Log in with the same credentials, and you'll get an access token. This means the user is authenticated.</p>
</li>
<li><p><strong>[GET]</strong> Use the access token to access the protected route.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724933502472/8a0965a2-8a2b-406a-83ba-8d7a41bd5377.png" alt class="image--center mx-auto" /></p>
<p><strong>📌</strong> Click on <strong>New HTTP Request</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724933631525/d7221754-8088-4753-8d3d-fd1f625402da.png" alt class="image--center mx-auto" /></p>
<p>Let's try the <strong>GET request</strong> and check out the preview. Use this API path: <a target="_blank" href="https://insomnia-demo.vercel.app/"><code>https://insomnia-demo.vercel.app/</code></a> and hit <strong>SEND.</strong> <mark>This is the API which I developed</mark></p>
<p><strong>Note:</strong> It's an <strong>open route.</strong></p>
<p>This means that anyone with the URL of the API can send requests to it and receive a response, without needing credentials like an API key, token, or login.</p>
<p>YAY 🎉, the server is up and running!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724933775503/2b77e3ab-a260-4188-bb8f-8657e3f321c0.png" alt class="image--center mx-auto" /></p>
<p><strong>What else do we see? 👀</strong></p>
<ol>
<li><p><strong>Status 200 OK</strong>: Right away, you can see if your request worked.</p>
</li>
<li><p><strong>Execution Time</strong>: Check how long your request took – super handy for performance insights.</p>
</li>
<li><p><strong>Headers</strong>: Get a detailed look at request and response headers, which is great for debugging and understanding how the API works.</p>
</li>
<li><p><strong>Response Size</strong>: See the size of the response, whether it’s 24B or 24MB – every byte counts!</p>
</li>
<li><p><strong>Mock Servers</strong>: No real server to test with? No worries. You can mock API responses and simulate server behavior for testing.</p>
</li>
<li><p><strong>Cookies</strong>: Keep an eye on cookies (if any) that get sent or received during the request, making session management a breeze.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724933889160/43480416-0a0c-4940-9a73-8c904e916d52.png" alt class="image--center mx-auto" /></p>
<p>Let's test the other APIs that we mentioned before and see if they work.</p>
<p>Create a <strong>new request</strong>. For the quick tutorial, we'll be doing <strong>HTTP requests</strong>, but you have so many options. You can also organize your interface using folders to keep your APIs tidy📂</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724934411864/9cf90ce8-487b-4f47-a138-491774c8732b.png" alt class="image--center mx-auto" /></p>
<p>We'll be signing up the user now. Use this API path <code>https://insomnia-demo.vercel.app/signup</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724934506580/c864a8d8-58c0-4795-adbf-f1b684d9e810.png" alt class="image--center mx-auto" /></p>
<p>Okay, so I made this <strong>POST</strong> request. Did you notice something? The domain <a target="_blank" href="https://insomnia-demo.vercel.app/"><code>https://insomnia-demo.vercel.app</code></a> is used everywhere.</p>
<p>You can set up <strong>environment variables</strong> to reuse values across multiple requests. Common examples include base URLs, authentication tokens, and resource IDs. This approach helps keep your requests organized and avoids repetitive configuration, making your API testing more efficient. Let's set one up.</p>
<p>Head over to the <strong>Base Environment</strong> option and click the <strong>pencil ✏️</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724934616356/a8daa5c6-6186-4f76-b0a5-1904d4a4f77c.png" alt class="image--center mx-auto" /></p>
<p>Put this in the body for our tutorial<br /><em>Note: the variable name can be anything as you would like</em></p>
<pre><code class="lang-json">     {
       <span class="hljs-attr">"host"</span>: <span class="hljs-string">"insomnia-demo.vercel.app"</span>
     }
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724934704287/53f22f9c-9f15-4519-83c5-df0872d49c1e.png" alt class="image--center mx-auto" /></p>
<p>And that's it, you're done 👍</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724934751366/074bcce9-dd1b-43e3-ae10-f0be555ea3de.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724934782231/2d10ed42-2191-446d-a4b6-771f022ff87e.png" alt class="image--center mx-auto" /></p>
<p>Add the <strong>BODY</strong>. There are a ton of options to choose from, but I'm going with <strong>JSON</strong>.</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"username"</span>: <span class="hljs-string">"Joey"</span>,
    <span class="hljs-attr">"password"</span>: <span class="hljs-string">"danse123"</span>
}
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724934874219/4a9c40c0-592a-46bd-a05e-73228a78811a.png" alt class="image--center mx-auto" /></p>
<p>User is registered successfully ✅</p>
<p>Now let's <strong>Log in</strong> the user. Use this API Path: <code>https://insomnia-demo.vercel.app/login</code></p>
<p>Use the same login credentials which you did for Sign up. YAY, we got the access token!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724935135030/104ce478-1ef7-403d-a53e-8a9cf1bdfa2d.png" alt class="image--center mx-auto" /></p>
<p>Here are the header details</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724935156206/d0100094-f63e-46e9-b60e-de7262537063.png" alt class="image--center mx-auto" /></p>
<p><strong>📌 Final step</strong>, let's access the <strong>protected route</strong> and see if it works.</p>
<p>A <strong>protected route</strong> in an API is an endpoint that requires authentication and/or authorization to access.</p>
<p>Use this API Path: <code>https://insomnia-demo.vercel.app/protected</code></p>
<p>We have a few Auth options, but for this example, we're going with the <strong>Bearer token</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724935498118/fabc7284-e519-43d8-a786-32dcfafada9c.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724935569350/7966e4a0-432a-44c0-b026-6f419086cc7b.png" alt class="image--center mx-auto" /></p>
<p>Voila! Using the access token, we got access to the protected route!</p>
<p>Now, let's check out some quick scenarios we forgot to test 🧪</p>
<p><strong>📌 Scenario 1:</strong> What if the route path isn't correct?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724935739217/79ffee5a-f827-47bd-9fad-a780523b7c49.png" alt class="image--center mx-auto" /></p>
<p><strong>📌 Scenario 2:</strong> What if the password is wrong?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724935971683/50e4efaf-212c-41e9-a6eb-8e23afdb9b17.png" alt class="image--center mx-auto" /></p>
<p><strong>📌 Scenario 3</strong>: What if we try to log in but the user doesn't exist?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724936007515/2cf971c4-4c85-4875-8866-bade422dff56.png" alt class="image--center mx-auto" /></p>
<p><strong>📌 Scenario 4:</strong> What if the access token has expired or is wrong?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724936050581/2e1321c8-bb05-4650-8896-65fa870d3cf2.png" alt class="image--center mx-auto" /></p>
<p>All the scenarios work just like we expected, and the preview tool gives the right status codes! It was super easy and user-friendly to use.</p>
<p>Oh, and there's another awesome feature I want to mention: <strong>Import/Export 👾</strong></p>
<p>From the Document or Collection name dropdown menu, select <strong>Import/Export</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724936232249/e6088d27-08f8-4969-92d4-86697527c3de.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724936248780/bed2f229-7e7a-4310-9c7f-3f43bdcf3249.png" alt class="image--center mx-auto" /></p>
<p>Here's the complete <strong>YAML file</strong> of the environment we set up in Insomnia.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724936308040/8a926fb1-c422-4576-a4d3-832cbe200ace.png" alt class="image--center mx-auto" /></p>
<p>Also, if you want to work with others in the environment, you can just invite them.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724936391243/6a0675d6-62f3-433a-9773-7234f849512d.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1724936412404/f8564fd5-1d47-48a5-9e0b-8616f03e9c72.png" alt class="image--center mx-auto" /></p>
<p>Which will look something like this. Pretty cool, right?</p>
<p>And there you have it, we explored <strong>Insomnia</strong> together 🦸🏻‍♀️</p>
<p>If you haven’t tried Insomnia yet, now’s the perfect time to see how it can boost your development experience. Download it, check out its features, and see how it changes your approach to API testing.</p>
<p>Got questions or stories to share? Drop them in the comments below – I’d love to hear how Insomnia is working for you. 😍</p>
<p>I'll be back with more tutorials on Insomnia, so stay tuned and see you in the next one.</p>
<p>Also, check out our <a target="_blank" href="https://x.com/empathyops">Twitter/X spaces</a> that we host weekly!! 😉  </p>
<p>Wait.. have you heard about the <strong>Kong API Summit</strong>?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725976812207/691b2bfe-210e-4ba9-9b62-b1a4cc849225.png" alt class="image--center mx-auto" /></p>
<p>The API Summit by Kong unites top minds in the API space to share best practices for building, running and governing APIs across any environment. Learn how to achieve zero-trust security, enhance developer productivity, reduce operational overhead and maximise ROI.  </p>
<p>Sign up for the <a target="_blank" href="https://konghq.com/events/conferences/api-summit">Kong API Summit</a>, which will be held virtually from 11-12 September! And attend talks &amp; keynotes from some amazing speakers onboard! 😍</p>
]]></content:encoded></item><item><title><![CDATA[You Get A Namespace And You Get One Too! Namespaces For Everyone!]]></title><description><![CDATA[Back in the early 2000s, whenever a Developer asked for something, we [painfully] gave it to them. The painful part wasn't about them, it was simply about procurement.
What is Procurement 🤔
In tech, I need to buy something from a vendor. I either ca...]]></description><link>https://blog.empathyops.io/you-get-a-namespace-and-you-get-one-too-namespaces-for-everyone</link><guid isPermaLink="true">https://blog.empathyops.io/you-get-a-namespace-and-you-get-one-too-namespaces-for-everyone</guid><category><![CDATA[NaaS]]></category><category><![CDATA[CNCF]]></category><category><![CDATA[Security]]></category><category><![CDATA[#namespaces]]></category><category><![CDATA[cloud native]]></category><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Marino Wijay]]></dc:creator><pubDate>Tue, 23 Jul 2024 12:30:31 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1721736360417/e049c48a-5a43-4884-8624-dab9670e864e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Back in the early 2000s, whenever a Developer asked for something, we [painfully] gave it to them. The painful part wasn't about them, it was simply about procurement.</p>
<p><strong>What is Procurement 🤔</strong></p>
<p>In tech, I need to buy something from a vendor. I either can work with a reseller who aggregates multiple vendors for me, or work directly with a vendor. Both have their advantages and disadvantages but it comes down to cost, speed, interoperability and support.</p>
<p>If a Dev needed a server, I'd call up one of my contacts and I'd request a quote that comprised of:</p>
<ul>
<li><p>The server itself (rack or tower)</p>
</li>
<li><p>A specification for CPU and memory</p>
</li>
<li><p>Disk configuration, RAID cards (and maybe some SAN-related network cards)</p>
</li>
<li><p>Cables</p>
</li>
</ul>
<p>If approved, I'd place the order and the gear would arrive in 2 weeks. <strong><em>TWO WEEKS. WHAT SPEED</em></strong>. Seriously, procurement times would vary and a lot of this would be tied to logistics, availability, and delivery. Once it all arrived, I still needed time to rack, and configure the server install an OS, patch it, add it to the network, join a domain, and do some final checks/tests for readiness. Once all was good, that Dev got access. Until they needed another server.</p>
<h2 id="heading-kubernetes-namespaces"><strong>Kubernetes Namespaces 🪄</strong></h2>
<p>Within the development world, you have multiple different teams such as developers, QA testers, and many more. Each of these teams requires a dedicated environment to carry out their work. Provisioning them with dedicated clusters can become very expensive and is, therefore, not an ideal solution. Instead, why not provide them with dedicated namespaces within the same Kubernetes cluster? You can spin up a namespace very easily and provision it to the individual teams. However, if you had to manually create all the appropriate authorization mechanisms and isolation boundaries for policies, that would involve a lot of manual work. This is where OpenUnison shines.</p>
<p>Splitting the cluster among all these different teams using namespaces is also what we call Multi-Tenancy. Multi-Tenancy in the simplest terms can be understood as “<strong>single resource, multiple users</strong>”.</p>
<p>When Kubernetes started gaining traction about a decade ago, multi-tenancy wasn’t a common discussion point. However, during the first KubeCon in 2016, OpenUnison showcased a multi-tenant Kubernetes stack, highlighting the potential and importance of this feature.</p>
<h3 id="heading-benefits-of-multi-tenancy">Benefits of Multi-Tenancy</h3>
<ol>
<li><p><strong>Cost Efficiency</strong>: Multi-tenancy reduces the number of control planes, cutting costs associated with hardware, management, and auditing.</p>
</li>
<li><p><strong>Human Resource Management</strong>: Kubernetes expertise is expensive and in high demand. Multi-tenancy minimizes the need for a Kubernetes expert in every team, reducing human resource costs.</p>
</li>
<li><p><strong>Operational Efficiency</strong>: Instead of upgrading numerous clusters and versions, multi-tenancy allows for a single upgrade process, significantly reducing the workload.</p>
</li>
<li><p><strong>Self-Service Model</strong>: App owners gain control over their environments, while cluster owners are freed from managing individual app owner requests.</p>
</li>
</ol>
<p>To enable our cluster to be multi-tenant, we use a concept called <strong>NameSpaces as a Service (NaaS)</strong>. It essentially manages the entire lifecycle of provisioning the namespace, setting the correct security boundaries, and allowing the developers and other teams to access only their specific namespace.</p>
<h2 id="heading-tremolo-naas">Tremolo NaaS🔓</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721632222413/d59dd86a-d224-4203-9035-f720ac777891.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721632222413/d59dd86a-d224-4203-9035-f720ac777891.png" /></p>
<p><a target="_blank" href="https://openunison.github.io/namespace_as_a_service/"><strong>Namespace as a Service (NaaS)</strong></a> simplifies the creation and management of Kubernetes namespaces while integrating with identity providers to enforce roles and permissions.</p>
<p>Out of the box, NaaS provides <strong>two primary roles</strong>: admin and view.</p>
<ol>
<li><p><strong>Admin View:</strong> grants comprehensive control over the namespace, excluding changes to cluster-wide objects like resource quotas</p>
</li>
<li><p><strong>View role:</strong> Offers read-only access to resources within the namespaces</p>
</li>
</ol>
<p>Additional roles can be customized to meet specific needs, such as granting support staff the ability to delete pods within the Kubernetes dashboard.</p>
<blockquote>
<p><strong>How do you manage access groups within a Kubernetes namespace after its creation and association with identity provider groups, ensuring that the cluster admin is not responsible for overseeing access permissions?</strong></p>
</blockquote>
<p>To address this, OpenUnison established an approval group, with the requester as the initial member. This setup not only provides a self-service interface for namespace creation but also for managing access.</p>
<p>There are <strong>three models</strong> for managing access groups:</p>
<ol>
<li><p><strong>Internal Self-Service Groups</strong>: In this model, the cluster owner controls the groups and authorization. While this offers control, it also requires implementing audit policies and reporting, all of which are provided out of the box.</p>
</li>
<li><p><strong>External Groups</strong>: This model integrates directly with external systems like Okta, Active Directory, or GitHub. It allows for seamless namespace management driven by your corporate identity system, eliminating the need for manual access approvals. The downside is that management relies entirely on the corporate identity system.</p>
</li>
<li><p><strong>Hybrid Group:</strong> This model leverages the ease of onboarding from external systems while allowing quick internal access adjustments. Most customers start with internal management, switch to external, and eventually adopt the hybrid model for the best of both worlds.</p>
</li>
</ol>
<p>All these processes can be fully automated, ensuring no manual intervention is needed for creating namespaces or managing access.</p>
<h2 id="heading-implementing-naas-within-openunison">Implementing NaaS within OpenUnison 🫣</h2>
<p>In our upcoming demonstration, we'll showcase the process of <strong>requesting a new namespace.</strong> Enterprise customers often require additional features, such as chargeback information, which can be easily integrated into the namespace request form.</p>
<p>OpenUnison supports various integrations, enabling the use of tools like Backstage or ServiceNow for interface interactions, instead of the default portal. This flexibility is a key advantage of our approach to multi-tenancy, which balances imperative and declarative methodologies.</p>
<p>Additionally, the system allows writing objects directly to the API or a Git repository, enhancing the flexibility of the namespace creation process.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721634503224/ae4eaa22-4b5e-44a6-923e-8add3010f0d6.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721634503224/ae4eaa22-4b5e-44a6-923e-8add3010f0d6.png" /></p>
<p>We can create <strong>a Kubernetes object</strong> with <strong>two flexible approaches;</strong></p>
<ol>
<li><p>Directly writing to the API Server</p>
</li>
<li><p>Using GitOps for version control</p>
</li>
</ol>
<p>To accommodate both methods, OpenUnison includes tools for each. When writing directly to the API server, the process is immediate and simple. However, if you prefer GitOps, you can set the <strong>"Write to request"</strong> option to true, enabling the accumulation of objects into a buffer during the workflow. Once complete, these objects are pushed to a Git repository using an SSH key.</p>
<p>To ensure seamless integration, we provide a task to wait for the GitOps controller to kick in, maintaining workflow continuity. This dual approach allows you to start with direct API interactions and transition to GitOps when ready, using the same workflows.</p>
<p>NOW come the configs and fun part!!! 😍</p>
<p>Namespace as a Service (NaaS) requires <strong>two key</strong> components for effective operation.</p>
<ol>
<li><p><strong>A relational database:</strong> It is essential for storing authorization information, synchronizing external identity information into buffer groups for RBAC binding, maintaining audit data, and managing state for asynchronous processes.</p>
</li>
<li><p><strong>An SMTP service:</strong> It is necessary for sending notifications to relevant stakeholders when access requests are made. While we support SMTP out-of-the-box, enterprises often prefer email notifications despite the rise of platforms like Slack and Teams.</p>
</li>
</ol>
<p>For ease of setup, we provide a <strong>MariaDB database</strong> for simple deployment and an SMTP Black Hole for handling email notifications without forwarding them, preventing log errors.</p>
<p>You can install the above components by following the <a target="_blank" href="https://openunison.github.io/namespace_as_a_service/#deploying-the-naas-portal">Open Unison Documentation.</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721635109080/8f98f399-6418-4474-b0e4-71a7ab0780aa.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721635109080/8f98f399-6418-4474-b0e4-71a7ab0780aa.png" /></p>
<h2 id="heading-deploying-the-naas-portal">Deploying The NaaS Portal 🚀</h2>
<h3 id="heading-testing-mariadb"><strong>Testing MariaDB</strong></h3>
<p>If you need a simple database implementation for testing:</p>
<pre><code class="lang-plaintext">&lt;https://raw.githubusercontent.com/OpenUnison/kubeconeu/main/src/main/yaml/mariadb_k8s.yaml&gt;
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721636956297/103fd98d-c7d4-4374-95bf-16d4eba1bb10.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721636956297/103fd98d-c7d4-4374-95bf-16d4eba1bb10.png" /></p>
<p>If you use this database, use the following configuration information.</p>
<h3 id="heading-testing-smtp-server"><strong>Testing SMTP Server</strong></h3>
<p>If you don't have an SMTP server available, you can use the SMTP Blackhole to have a place to send email without forwarding it to any recipients:</p>
<pre><code class="lang-plaintext">kubectl create ns blackhole
kubectl create deployment blackhole --image=tremolosecurity/smtp-blackhole -n blackhole
kubectl expose deployment/blackhole --type=ClusterIP --port 1025 --target-port=1025 -n blackhole
</code></pre>
<p>If you use the blackhole smtp service, use the following configuration information:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721637143327/93f8096d-05c6-4adc-bf1b-e4dc01e1cdc3.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721637143327/93f8096d-05c6-4adc-bf1b-e4dc01e1cdc3.png" /></p>
<p>Next, update your <code>values.yaml</code>, uncommenting the <code>database</code> and <code>smtp</code> sections of your <code>values.yaml</code>. As an example, the below will work with the testing database and SMTP server:</p>
<pre><code class="lang-plaintext">database:
  hibernate_dialect: org.hibernate.dialect.MariaDBDialect
  quartz_dialect: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
  driver: org.mariadb.jdbc.Driver
  url: jdbc:mariadb://mariadb.mariadb.svc.cluster.local:3306/unison
  user: unison
  validation: SELECT 1

smtp:
  host: blackhole.blackhole.svc.cluster.local
  port: 1025
  user: "none"
  from: donotreply@domain.com
  tls: false
</code></pre>
<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">MySQL and MariaDB have recently diverged, with MariaDB no longer maintaining compatibility with MySQL. Therefore, if you choose to use MariaDB, you must use its specific configuration.</div>
</div>

<p>For enterprises, the system supports <strong>Kerberos authentication</strong> with <strong>SQL Server</strong>, allowing you to mount a Kerberos keytab into the namespace for authentication instead of using a password, highlighting the enterprise-level support provided.</p>
<p>With your configuration updated, the next step is to choose which management model to use. We'll be doing the internal groups model.</p>
<p>To deploy the local management self-service model, first enable internal groups by adding the following to your <code>values.yaml</code>:</p>
<pre><code class="lang-plaintext">openunison:
  non_secret_data:
    SHOW_PORTAL_ORGS: "true"
  role_attribute: portalGroups
  groups:
    areJson: "true"
  enable_provisioning: true
  use_standard_jit_workflow: false
  naas:
    groups:
      internal:
        enabled: true
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721641332408/1a56d9d5-aeba-4e3b-a041-d293a907a7a6.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721641332408/1a56d9d5-aeba-4e3b-a041-d293a907a7a6.png" /></p>
<p>We provide instructions for customizing OpenUnison's configuration, specifically focusing on the <code>role_attribute</code> setting. He suggests changing the attribute name from <code>groups</code> to <code>portalGroups</code></p>
<p><strong>Explanation</strong></p>
<ul>
<li><p>The <code>role_attribute</code> configuration dictates how OpenUnison processes and displays role-related information.</p>
</li>
<li><p>By changing this attribute, you're customizing how OpenUnison presents group information. Instead of showing raw group data, it will present a more refined view, displaying permissions and roles in the context of namespaces and clusters.</p>
</li>
<li><p>This customization helps in better managing and displaying user permissions within the web interface, making it clearer which permissions apply to which namespaces and clusters.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721641534954/8dd6610c-b93d-4924-83f8-514b14ff7572.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721641534954/8dd6610c-b93d-4924-83f8-514b14ff7572.png" /></p>
</li>
</ul>
<p>We made some additional configurations which are:</p>
<ol>
<li><p><strong>Change</strong><code>areJson</code> to <code>true</code>: This enables the JSON format for groups or roles, ensuring that data is processed or displayed in JSON format.</p>
</li>
<li><p><strong>Set</strong><code>enable_provisioning</code> to <code>true</code>: This activates the provisioning feature, allowing for the automated setup of resources or user accounts within OpenUnison.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721641632266/b7086708-0958-4679-82bc-72c926ff6d84.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721641632266/b7086708-0958-4679-82bc-72c926ff6d84.png" /></p>
<p> We also do the following:</p>
<ol>
<li><p><strong>Add</strong><code>active_mq_pvc: true</code>: This line should be added to enable the use of a Persistent Volume Claim (PVC) for ActiveMQ’s data store, in addition to the existing setting for <code>enable_activemq</code>. This change is intended to address issues related to disk space and log management that arose from using a database for ActiveMQ’s data store.</p>
</li>
<li><p><strong>Explanation</strong>: ActiveMQ can operate in <strong>two modes</strong> for its data storage: using a database or a PVC. Initially, a database was used due to local deployment constraints, but this approach caused excessive log growth and potential disk space issues. Switching to a PVC helps mitigate these problems by providing more manageable and scalable storage.</p>
</li>
</ol>
</li>
</ol>
<p>    <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721642018104/160d2eff-9a1c-458c-980c-30b5657eab4b.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721642018104/160d2eff-9a1c-458c-980c-30b5657eab4b.png" /></p>
<p>    Before deploying using <code>ouctl</code>, ensure that you have a password file for both MariaDB and your SMTP server.</p>
<p>Now we are ready to <strong>DEPLOY!!!! 😍</strong></p>
<pre><code class="lang-plaintext">helm repo update
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721642350890/c697fcc2-41e1-408a-992f-7bc9593b6ea7.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721642350890/c697fcc2-41e1-408a-992f-7bc9593b6ea7.png" /></p>
<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">Note: After deploying the initial charts, an additional chart <code>cluster management</code> will be deployed. This chart is responsible for adding the Namespace as a Service (NaaS) functionality.</div>
</div>

<p>There are a few points to keep in mind. If you run into errors, these will be useful for debugging.</p>
<ol>
<li><p><strong>PVC Creation</strong>: The Persistent Volume Claim (PVC) is created from a StatefulSet template. If the PVC is missing, scale the StatefulSet down to zero and then back up to one to recreate the PVC.</p>
</li>
<li><p><strong>Scaling StatefulSet</strong>: Ensure that only one replica is running to avoid complications. Multiple replicas can cause issues with PVCs and deployment stability.</p>
</li>
<li><p><strong>Check Quota</strong>: Verify that you have enough available volume space and that you haven’t exceeded your quota. If necessary, provision additional quota.</p>
</li>
<li><p><strong>Re-run ouctl</strong>: Once everything is set up correctly and quotas are verified, rerun the <code>ouctl</code> command to continue with the deployment process.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721643191954/05a5a08a-c160-48f9-b4c3-051aaf135f64.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721643191954/05a5a08a-c160-48f9-b4c3-051aaf135f64.png" /></p>
<p>An additional deployment for ActiveMQ is set up and running, functioning as a message bus. The version currently deployed is not High Availability (HA) and is intended primarily for initial setup and testing. It is not suitable for production environments.</p>
<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">Note: An HA version of ActiveMQ is in development. This version will be suitable for production and will require a ReadWriteMany (RWX) Persistent Volume Claim (PVC). This setup can be complex but is necessary for robust, high-availability messaging.</div>
</div>

<p>Now go ahead and log into your OpenUnison!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644249120/b8da3134-d36d-40a7-a269-519860e01a83.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644249120/b8da3134-d36d-40a7-a269-519860e01a83.png" /></p>
<p>An option there called local deployment so that's where your tokens and your dashboard</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644342102/f6c15956-59e4-4868-8741-7a2583e74bf8.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644342102/f6c15956-59e4-4868-8741-7a2583e74bf8.png" /></p>
<p>Now go click on your account information in the upper left-hand corner</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644414627/7df25af7-cd21-4f4f-a77c-8cfad21241e5.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644414627/7df25af7-cd21-4f4f-a77c-8cfad21241e5.png" /></p>
<p>As the first person setting up the system, you automatically become the administrator. This is because it's common practice to grant administrative rights to the person who initiates the setup process. The system is designed to automate this assignment, ensuring that the initial setup user has the appropriate administrative access from the start.</p>
<p>Now let's create k8s namespace!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644626976/457de084-3879-4c90-8798-0731e58965bf.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644626976/457de084-3879-4c90-8798-0731e58965bf.png" /></p>
<p>Click on <strong>“New Kubernetes Namespace”</strong></p>
<p>You can give your namespace a unique name and create the namespace.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644683350/d78065c2-950e-4be7-8933-cadec3b95579.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644683350/d78065c2-950e-4be7-8933-cadec3b95579.png" /></p>
<p>Now comes the <strong>Open Approvals &amp; Reports</strong> section.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644779777/aec83b2b-2622-4976-9272-d883a7ff15f7.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644779777/aec83b2b-2622-4976-9272-d883a7ff15f7.png" /></p>
<p>Under the <strong>"Reports"</strong> section, locate the <strong>"Users"</strong> button and search for your name.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644939726/6c21adbe-8c52-4921-bd91-aa6102d23562.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644939726/6c21adbe-8c52-4921-bd91-aa6102d23562.png" /></p>
<p>Use the <strong>"Add to Cart"</strong> feature to manage workflows for this user, such as assigning roles or running pre-approvals.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644992220/786b00aa-2c94-4f55-96f5-d9dcd18b6d5a.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721644992220/786b00aa-2c94-4f55-96f5-d9dcd18b6d5a.png" /></p>
<p>Navigate to <strong>"Open Approvals" t</strong>o review and approve requests. As an administrator, you can decide on requests and customize attributes, such as including chargeback information in the approval process.</p>
<p>In the Kubernetes Dashboard, we can see that a role and role binding has been created.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721645634657/7471e9eb-00c9-49f1-bcea-a704dbbe0717.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721645634657/7471e9eb-00c9-49f1-bcea-a704dbbe0717.png" /></p>
<p>To approve a namespace creation request, you can use the following steps:</p>
<ol>
<li><p><strong>Request Access:</strong> Navigate to "Request Access" and find the option for "Local Deployment." Expand the menu and select "Administration" to view the administrators.</p>
</li>
<li><p><strong>Approval Role:</strong> As the first approver and the person who requested the namespace, you have the authority to approve access requests. This role is tied to the business owner’s responsibilities.</p>
</li>
<li><p><strong>Request on Behalf:</strong> You can request access on behalf of others, as long as they are logged in first. This system supports "just-in-time" access management.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721645681594/6a2cda30-08fa-4aa1-b8ec-1da1fb4091ae.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721645681594/6a2cda30-08fa-4aa1-b8ec-1da1fb4091ae.png" /></p>
<p>The out-of-the-box Namespace as a Service workflow will generate a <code>Namespace</code> and <code>RoleBindings</code>, along with the groups needed to manage access. This is rarely enough to satisfy multitenancy requirements. You'll generally want to create at least a <code>ResourceQuota</code>, maybe <code>NetworkPolicy</code>s, etc. There are several customization points where you can add your tasks.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721646938268/a4151d81-64d3-4b90-b96a-4bee4b2d36b3.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721646938268/a4151d81-64d3-4b90-b96a-4bee4b2d36b3.png" /></p>
<p>Now create a new namespace:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721647215478/235d7a36-5f4a-4aab-8efb-522740efb43a.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721647215478/235d7a36-5f4a-4aab-8efb-522740efb43a.png" /></p>
<blockquote>
<p>Not every Namespace needs the side cars that's right, so the question is how do we collect that information and then how do we provision it into our cluster?</p>
</blockquote>
<p>In Kubernetes environments, not all namespaces require sidecar containers. To manage this effectively, OpenUnison provides a method to collect and use information regarding the need for sidecars through custom attributes.</p>
<h3 id="heading-custom-attributes">Custom Attributes</h3>
<p>The form for onboarding a new namespace can have custom attributes added. These attributes can be as simple as a text box, or as complex as a drop-down with values loaded from an external API. Adding an attribute requires an update to the [<code>openunison.naas.forms.new](&lt;http://openunison.naas.forms.new/&gt;)_namespace.additional_attributes</code> section. For instance, if you wanted as users if they want to enable istio sidecar injection in your namespace, you could add:</p>
<pre><code class="lang-plaintext">openunison:
  naas:
    forms:
      new_namespace:
        additional_attributes:
        - name: istio_enabled
          # what will be displayed on the form
          displayName: Enable Istio Sidecars
          # validating regular expression
          regEx: ".*"
          # An error to provide the user if the regex fails
          regExFailedMsg: "Invalid istio configuration"
          # minimum number of characters
          minChars: 0
          # maximum number of characters
          maxChars: 0
          # should the value of this attribute be unique in OpenUnison
          unique: false
          # can by one of list, text, dynamicList
          type: list
          # if list, the values and labels in the form of DisplayLabel=value
          values:
          - Enabled=enabled
          - Disabled=disabled
</code></pre>
<p>Once the attribute is added to a form, it's available to workflows as both a request object with the name of the attribute and a user attribute. Attribute values are also available to approvers to provide additional context.</p>
<h3 id="heading-namespace-labels-and-annotations">Namespace Labels and Annotations</h3>
<p>When the namespace is provisioned, it can have custom labels and annotations. These annotations and labels can be generated from custom attributes, or created in a (workflow hook)[#workflow_hooks]. The value for an annotation or label must be preset in the request object. You add custom labels through name/value pairs in <a target="_blank" href="http://openunison.naas.workflows.new"><code>openunison.naas.workflows.new</code></a><code>_namespace.namespace_request_labels</code> and annotations through <a target="_blank" href="http://openunison.naas.workflows.new"><code>openunison.naas.workflows.new</code></a><code>_namespace.namespace_request_annotations</code>. For instance, to add the <code>istio-injection</code> label to a new namespace, you would add:</p>
<pre><code class="lang-plaintext">openunison:
  naas:
    workflows:
      new_namespace:
          namespace_request_labels:
            istio-injection: istio_enabled
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721648386259/6f3e37e1-842b-4352-aef5-549bebe08211.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721648386259/6f3e37e1-842b-4352-aef5-549bebe08211.png" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721648562139/0003c1b4-253c-42bf-b4ba-05c1d55ec117.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721648562139/0003c1b4-253c-42bf-b4ba-05c1d55ec117.png" /></p>
<h3 id="heading-upgrading-a-chart-in-openunison">Upgrading a Chart in OpenUnison 📈</h3>
<p>To upgrade the chart without rerunning the entire OpenUnison control command, you can use Helm to apply the updates. Here’s how:</p>
<ol>
<li><p><strong>Run the Upgrade Command:</strong></p>
<pre><code class="lang-plaintext"> helm upgrade &lt;release-name&gt; &lt;chart-name&gt; --namespace &lt;namespace&gt;
</code></pre>
<ul>
<li><p><code>&lt;release-name&gt;</code>: The name of the release you want to upgrade.</p>
</li>
<li><p><code>&lt;chart-name&gt;</code>: The name of the Helm chart you are upgrading.</p>
</li>
<li><p><code>&lt;namespace&gt;</code>: The Kubernetes namespace where the release is deployed.</p>
</li>
</ul>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721648795541/3c9d2e77-22e4-4275-836e-2b6ef6dc3385.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721648795541/3c9d2e77-22e4-4275-836e-2b6ef6dc3385.png" /></p>
<p>LOOK <strong>"enabled Istio sidecars"</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721649371622/809df173-3a03-4fa5-b161-ddff8a38e847.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721649371622/809df173-3a03-4fa5-b161-ddff8a38e847.png" /></p>
<p><strong>2. Developer Tools:</strong></p>
<p>To integrate OpenUnison with other systems, such as Backstage, you can use developer tools to access API information:</p>
<ol>
<li><p><strong>Open Developer Tools</strong> in your browser and navigate to the <strong>"Config"</strong> section (typically located about three-quarters of the way down the menu).</p>
</li>
<li><p>Click on the <strong>"Response"</strong> tab to view the API response data. This data includes all metadata driven by the server-side, as the form is dynamically generated based on this metadata.</p>
</li>
<li><p><strong>API Documentation:</strong> Access the API documentation via the Swagger docs on the OpenUnison website. This documentation provides detailed information on how to generate client code and interact with the APIs.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721649509789/32d8aaa6-922b-490d-873d-9d2551fce6f7.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721649509789/32d8aaa6-922b-490d-873d-9d2551fce6f7.png" /></p>
<p><strong>3. Customizing for Namespace Sidecars:</strong></p>
<p>To update your cluster configuration to handle sidecar injection based on form data:</p>
<ol>
<li><p><strong>Update Namespace Labels and Annotations:</strong> Configure your Helm chart or deployment settings to include the logic for injecting sidecars based on the attributes collected from the form.</p>
</li>
<li><p><strong>Integration and Automation:</strong> Use the provided API responses to automate form handling and resource provisioning, ensuring that your multi-tenant environment is configured according to the specified requirements.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721649875647/77ccddf8-98ba-443e-96df-bf49ea5ffa97.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721649875647/77ccddf8-98ba-443e-96df-bf49ea5ffa97.png" /></p>
<ul>
<li><p><strong>Add Labels:</strong> The configuration involves adding a label (<code>istio_injection</code>) that corresponds to the request attribute (<code>istio_enabled</code>) for sidecar injection. This label helps manage sidecar injection in namespaces based on user input.</p>
</li>
<li><p><strong>Annotations:</strong> While annotations are similar to labels, they are not necessary for this particular task but can be configured in the same manner if needed</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721649953927/ed0c6066-7711-44bc-8997-74ab3240045a.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721649953927/ed0c6066-7711-44bc-8997-74ab3240045a.png" /></p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721650155752/c4a0c295-114e-4644-8d8f-e1a3c85f97ba.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721650155752/c4a0c295-114e-4644-8d8f-e1a3c85f97ba.png" /></p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721650208992/8e9a6d5f-e28a-4059-b017-78799878092c.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721650208992/8e9a6d5f-e28a-4059-b017-78799878092c.png" /></p>
<p>  BOOM!!!! 🎊🎉</p>
<p>  You’ve achieved a significant milestone: automating the onboarding process for Istio-enabled applications.</p>
</li>
</ul>
<p>OpenUnison provides hooks that allow the injection of code in the form of a workflow at various points during the process of onboarding a namespace. This helps protect against the Noisy Neighbour problem.</p>
<ol>
<li><p><strong>Workflow Hooks</strong>: The system offers hooks to inject code at different stages of the namespace onboarding process. This customization is documented in the "customizing the namespace onboarding process" section.</p>
</li>
<li><p><strong>Resource Quotas</strong>: They will use these hooks to implement a resource quota as part of the namespace onboarding.</p>
</li>
<li><p><strong>Multi-Tenancy with V Cluster</strong>: Referring to the Kubernetes and Enterprise Guide Third Edition, Marc mentions that in the V Cluster chapter, after creating a namespace, they deploy a V Cluster into the namespace using a workflow.</p>
</li>
<li><p><strong>Example of Use</strong>: The workflows can be extended to handle more complex multi-tenancy setups, such as deploying V Clusters within namespaces.</p>
</li>
</ol>
<p>To learn about all of the different ways in which you can customize the NaaS Onboarding process, check out the official <a target="_blank" href="https://openunison.github.io/documentation/customize-naas-onboarding/">documentation</a>.</p>
<p>Let's create a resource quota with input on the form. Take the the sample yaml that's in there for the pre-run workflow.</p>
<pre><code class="lang-plaintext">apiVersion: openunison.tremolo.io/v1
kind: Workflow
metadata:
  name: create-resource-quota
  namespace: openunison
spec:
  description: creates a ResourceQuota object
  inList: false
  label: Creates a ResourceQuota
  orgId: internal-does-not-exist
  tasks: |-
      - taskType: customTask
        className: com.tremolosecurity.provisioning.tasks.CreateK8sObject
        params:
            targetName: $cluster$
            template: |-
                kind: ResourceQuota
                apiVersion: v1
                metadata:
                  name: resource-quota
                  namespace: $nameSpace$
                annotations:
                    tremolo.io/managedByGit: "$useGit$"
                spec:
                    hard:
                        cpu: "5"
                        memory: 10Gi
                        pods: 10
            srcType: yaml
            writeToRequest: "$useGit$"
            requestAttribute: git-secret-cluster-k8s-$nameSpace$
            path: /yaml/ns/$nameSpace$/resourcequotas/
</code></pre>
<p>We can dynamically manage the number of pods by user input during the namespace onboarding process.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721651505349/e22caa8b-89bc-46c6-b6e4-91a172a6f584.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721651505349/e22caa8b-89bc-46c6-b6e4-91a172a6f584.png" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721651561133/dfa890e1-7abd-49bc-a309-fd3cccad7b78.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721651561133/dfa890e1-7abd-49bc-a309-fd3cccad7b78.png" /></p>
<p>To finalize the workflow creation, you need to ensure the following:</p>
<ol>
<li><p><strong>Syntax Validation</strong>: The Open Unison operator validates the syntax of your workflow. If there are any mistakes or incorrect configurations, you will receive an error when you submit it.</p>
</li>
<li><p><strong>Post-Creation Steps</strong>:</p>
<ul>
<li><p><strong>Add the Attribute</strong>: First, you need to inform Open Unison to include the newly created attribute.</p>
</li>
<li><p><strong>Invoke the Workflow</strong>: Then, you need to configure Open Unison to call the created workflow after the namespace is created.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721651962586/ba911b43-9245-46e6-9d18-82fce2e6b664.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721651962586/ba911b43-9245-46e6-9d18-82fce2e6b664.png" /></p>
<p>  Let’s look at the process of adding a new attribute to the form and integrating it into the workflow:</p>
<ul>
<li><strong>Locate the Attribute Section</strong>: Find the section in the <code>values.yaml</code> file where attributes for the form are defined. Specifically, look for the existing <code>istio_enabled</code> attribute.</li>
</ul>
</li>
</ul>
</li>
</ol>
<p>    <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721652255109/36e669d2-544d-4c4d-9bfc-1dfe0ba17f22.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721652255109/36e669d2-544d-4c4d-9bfc-1dfe0ba17f22.png" /></p>
<ol>
<li><p><strong>Duplicate and Modify</strong>: Duplicate the <code>istio_enabled</code> block and modify it to create a new attribute for the maximum number of pods:</p>
<ul>
<li><p><strong>Name</strong>: Set the name to <code>quote_pods</code>.</p>
</li>
<li><p><strong>Display Name</strong>: Set the display name to "Requested Maximum Number of PODS."</p>
</li>
<li><p><strong>Regex</strong>: Add a regular expression to ensure only numbers are accepted.</p>
</li>
<li><p><strong>Failure Message</strong>: Customize the failure message to indicate the input must be a number.</p>
</li>
<li><p><strong>Min and Max Characters</strong>: Set minimum and maximum character limits to restrict the input to valid numbers.</p>
</li>
<li><p><strong>Type</strong>: Change the type to <code>text</code> and set values to an empty list.</p>
</li>
</ul>
</li>
</ol>
<p>        <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721652355253/c633bd2f-e776-4fe7-90d1-6b9ccb3c2c31.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721652355253/c633bd2f-e776-4fe7-90d1-6b9ccb3c2c31.png" /></p>
<ol start="2">
<li><p><strong>Integrate Attribute into Workflow</strong>:</p>
<ul>
<li><p>After defining the new attribute, update the workflow to handle this new input.</p>
</li>
<li><p>Use the post namespace create workflow hook from the documentation to ensure that after a namespace is created, the resource quota object is also created based on the user input.</p>
</li>
</ul>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1721652399154/fe0a06bf-5509-4965-aad1-a35651033e37.png" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1721652399154/fe0a06bf-5509-4965-aad1-a35651033e37.png" /></p>
<p>Navigate to the dashboard to verify that the namespace has been created. Confirm the presence of a resource quota for the namespace, and ensure that there are 20 resources highlighted as inputted by the user.</p>
<h1 id="heading-conclusion">Conclusion 🤓</h1>
<p>In this blog, we learned about the concept of namespace as a service and how it can enable multi-tenancy within a Kubernetes cluster. We also saw the different ways in which we can use Open Unison for creating NaaS, and how we can create and approve permission for different users.</p>
<p>Overall, NaaS and multi-tenancy enable us to reduce cluster costs while maintaining a high level of security.</p>
<p>Thank you for reading!! 🤩</p>
<p><img src="https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExdWlzaDdwdjB2aTBydWxsY3Zkd2t3dWJvNHF2MXIxb2Q0Ymp1dnIzeiZlcD12MV9naWZzX3NlYXJjaCZjdD1n/ZfK4cXKJTTay1Ava29/giphy.gif" alt class="image--center mx-auto" /></p>
<p>If you found this blog interesting, check out <a target="_blank" href="https://www.youtube.com/watch?v=anpgM5mGaAI">Part 1</a> and <a target="_blank" href="https://www.youtube.com/watch?v=bXAiAcGEtiY">Part 2</a> of the live streams to hear the full conversation.😊</p>
<p>If you liked this blog, feel free to share it with your companions and stay updated with the latest developments in Cloud Native networking by following us on Twitter at <a target="_blank" href="https://twitter.com/EmpathyOps"><strong>EmpathyOps</strong></a> and checking out our <a target="_blank" href="https://empathyops.io/"><strong>website</strong></a>!</p>
]]></content:encoded></item><item><title><![CDATA[Jump on the Security Token Express Train! 🚊]]></title><description><![CDATA[In late 2018, Facebook’s engineering team found a security flaw that affected around 50 million accounts. It began with a feature called "View As," which let users see how their profile looked to others. However, this feature had a serious vulnerabil...]]></description><link>https://blog.empathyops.io/jump-on-the-security-token-express-train</link><guid isPermaLink="true">https://blog.empathyops.io/jump-on-the-security-token-express-train</guid><category><![CDATA[Security]]></category><category><![CDATA[authentication]]></category><category><![CDATA[authorization]]></category><category><![CDATA[token]]></category><dc:creator><![CDATA[Marino Wijay]]></dc:creator><pubDate>Fri, 07 Jun 2024 13:40:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1717766616878/de4aa84c-5c2d-4f99-8058-f5bcc060838c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In late 2018, Facebook’s engineering team found a security flaw that affected around <strong>50 million accounts</strong>. It began with a feature called <strong>"View As,"</strong> which let users see how their profile looked to others. However, this feature had a serious vulnerability. Attackers found they could use it to steal <strong>Facebook access tokens</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1717765744124/78e26abe-9940-4d9f-bd34-f21e56f71711.png" alt class="image--center mx-auto" /></p>
<p>An access token is like a digital key that lets an app access an API. It tells the API that the token holder is allowed to do certain things. In this case, attackers used stolen access tokens to take over Facebook accounts, possibly accessing personal messages, photos, and other sensitive information.</p>
<blockquote>
<p><strong>Can you believe it? Almost 90 million Facebook users were affected by a breach that compromised access tokens to the platform!😱</strong></p>
</blockquote>
<p>In a more recent example, the popular AI platform <strong>Hugging Face</strong> reported a security breach on its <strong>Spaces platform</strong>, a community repository for AI apps. Hackers accessed authentication secrets, possibly compromising user data. And this happened just a few days ago.</p>
<p>Read more about the security breach <a target="_blank" href="https://www.bleepingcomputer.com/news/security/ai-platform-hugging-face-says-hackers-stole-auth-tokens-from-spaces/?utm_content=bufferfa41f&amp;utm_medium=social&amp;utm_source=twitter.com&amp;utm_campaign=buffer">here</a>.</p>
<p>With the above two incidents, you’ve probably understood the importance of access tokens and the implications of them getting exposed. In today's digital world, managing these tokens well is essential to protect sensitive data such as personal information, credit card details, government issues documents, etc and maintain user trust.</p>
<p>Until now, we’ve used the word "Token" quite a bit - but what exactly is it? Let's understand tokens and their types.</p>
<h2 id="heading-lets-talk-about-tokens"><strong>Let's talk about Tokens 🔑</strong></h2>
<p>Tokens are pieces of data containing information to identify a user and determine if they are allowed to perform certain actions. In short, tokens help application systems with authorization and authentication.</p>
<p>Before understanding the various types of security tokens, let’s do a quick recap on Authorization &amp; Authentication, and how the two differ. We’ll try and understand it with a fun example.</p>
<h2 id="heading-what-is-authentication"><strong>What is Authentication?</strong></h2>
<p>Authentication is the process of verifying who a user or device is. During this process, the user or device provides some proof, called an <em>authentication factor</em>, to confirm their identity. Is that confusing? Let’s try to make sense of it using an everyday example.</p>
<p>Imagine you’re going to the bank to withdraw some money. The clerk will ask for your ID to verify that you are exactly who you say you are. Similarly, when you buy a flight ticket, you need to show your passport to prove you are the person who bought the ticket before boarding the plane. These are two real-life examples of authentication, where your identity is confirmed.</p>
<p>When we talk about authentication in the software realm, the core concept is the same as the two examples we discussed above. However, the methods are different. Instead of using a physical government issues identification, you’d use tokens to validate the identity</p>
<h2 id="heading-what-is-authorization"><strong>What is Authorization?</strong></h2>
<p>In contrast to authentication, authorization is about checking what resources users or devices can access and what actions they can perform.</p>
<p><strong>For example</strong>, when you buy a ticket for a show, the venue doesn't care about your identity. They just want to know if you are allowed to attend the show. To prove this, you use a ticket instead of an ID or passport.</p>
<p>In internet-based software apps, a common way to handle authorization is by using things called <strong>tokens</strong>. Once a user is logged in, the app starts focusing on what the user can do. This is where a token comes in—it holds details about what the user is allowed to do based on their identity. The system then uses this token to decide whether to grant or deny access to resources.</p>
<p>So, you see, authentication and authorization can sometimes get mixed up, which can be confusing.</p>
<blockquote>
<p>But here's the key thing: <strong>authentication comes before authorization, but not the other way around.</strong></p>
</blockquote>
<p>While proving who you are might be enough to get access to something (that's authorization), just having permission doesn't always tell you who someone is.</p>
<p>So, about those tokens—in the world of web authentication and authorization, you might have heard the term <strong>"Bearer token."</strong> But what does it mean? How does it work? And why is "Bearer" in front of the token?</p>
<h1 id="heading-whats-the-deal-with-bearer-tokens"><strong>What's the deal with Bearer Tokens? 🙄</strong></h1>
<p>Bearer tokens are a way to show what kind of token is being used for logging in and getting access to resources within your system. They're often used with OAuth 2.0 and other token-based systems.</p>
<p>When you log in, you get a token from the server. This token proves you're logged in and lets you access protected parts of a web server. You usually put the Bearer token in the <strong>“Authorization”</strong> header of an HTTP request.</p>
<p>To show that the token is a <strong>“Bearer”</strong> type, you put the word <strong>"Bearer"</strong> before the actual token in the <strong>“Authorization”</strong> header.</p>
<p>Here's what the <strong>“Authorization”</strong> header looks like with a Bearer token:</p>
<pre><code class="lang-plaintext">Authorization: Bearer &lt;token&gt;
</code></pre>
<p>In this example, <code>&lt;token&gt;</code> is the actual token given to the client by the authentication server. The web server that gets the request can then check and validate the token. If the token is valid and authorized, it grants access to the requested resource.</p>
<p>Moving on, what kind of token should we use for Authentication or Authorization?</p>
<p>"Let's secure this API call with a token. Should I go with the <strong>ID token</strong> or the <strong>access token</strong>? The ID token looks better to me. I mean, if I know who the user is, I can make better authorization choices, right?"</p>
<p>This is not the correct way to choose a particular token for your use case. Choices based on your intuition may sound good, but what looks intuitive is not always correct. Using the wrong token can result in your solution being insecure.</p>
<p>Let’s take a closer look at these two types of tokens to better understand their role.</p>
<h2 id="heading-show-your-id-id-token"><strong>Show your ID - ID token? 🪪</strong></h2>
<p>An ID token is an artifact that proves that <strong>the user has been authenticated</strong>. It was introduced by OpenID Connect (OIDC), an open standard for authentication used by many identity providers such as Google &amp; Facebook.</p>
<p>Consider the following diagram:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1717419865216/37364caf-9472-4469-9edd-8ae2802e602f.png" alt class="image--center mx-auto" /></p>
<p>Here, a user with their browser authenticates against an OpenID provider and gets access to a web application. The result of that login process, based on OpenID Connect, is the ID token, which is sent to the app as proof that the user is authenticated.</p>
<p>This gives a basic idea of what an ID token is: proof that the user is authenticated.</p>
<p>An ID token is <strong>encoded as a JSON Web Token</strong> (JWT), a standard format that lets your app easily check its content, ensure it comes from the right issuer, and verify that no one has tampered with it.  If you want to learn more about JWT, check out <a target="_blank" href="https://jwt.io/introduction">this artic</a>le.</p>
<p>An ID token something looks like this:</p>
<pre><code class="lang-plaintext">eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwOi8vbXktZG9tYWluLmF1dGgwLmNvbSIsInN1YiI6ImF1dGgwfDEyMzQ1NiIsImF1ZCI6IjEyMzRhYmNkZWYiLCJleHAiOjEzMTEyODE5NzAsImlhdCI6MTMxMTI4MDk3MCwibmFtZSI6IkphbmUgRG9lIiwiZ2l2ZW5fbmFtZSI6IkphbmUiLCJmYW1pbHlfbmFtZSI6IkRvZSJ9.bql-jxlG9B_bielkqOnjTY9Di9FillFb6IMQINXoYsweyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwOi8vbXktZG9tYWluLmF1dGgwLmNvbSIsInN1YiI6ImF1dGgwfDEyMzQ1NiIsImF1ZCI6IjEyMzRhYmNkZWYiLCJleHAiOjEzMTEyODE5NzAsImlhdCI6MTMxMTI4MDk3MCwibmFtZSI6IkphbmUgRG9lIiwiZ2l2ZW5fbmFtZSI6IkphbmUiLCJmYW1pbHlfbmFtZSI6IkRvZSJ9.bql-jxlG9B_bielkqOnjTY9Di9FillFb6IMQINXoYsw
</code></pre>
<p>Of course, this isn't readable to the human eye, so you'll need to decode it to see what's inside the JWT.</p>
<p>You can use the debugger at <a target="_blank" href="https://jwt.io/">jwt.io</a> to do this.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1717410278182/910d17ad-b222-4d69-bc18-ccce731a458c.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-need-access-access-token"><strong>Need access - Access Token? 🔓</strong></h2>
<p>Now that you know what an ID token is, let’s try to understand what an access token is.</p>
<p>Let's start by depicting a scenario where the access token  is used:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1717420053311/805c4801-0efa-4335-81b7-8e9c7c25477b.png" alt class="image--center mx-auto" /></p>
<p>Using the above diagram, imagine that a <strong>client application</strong> wants to access a <strong>resource</strong>. This resource can be anything like an API, database or something else that's protected from unauthorized access. The other two elements in the diagram are the user, who is the <strong>owner</strong> of the resource, and the <strong>authorization server</strong>. In this setup, the access token is what <strong>lets the client application access the user's resource</strong>. It's given out by the authorization server after the user successfully logs in and gives their consent.</p>
<p>The access token <strong>lets a client application access a specific resource to do specific actions on behalf of the user</strong>. This is called a <strong>delegated authorization scenario</strong>: the user lets a client application access a resource for them. For example, you can let your LinkedIn app access Twitter’s API to cross-post on both social platforms. Remember, you only allow LinkedIn to post on Twitter for you. You don't let it delete posts, change your profile, or do other things.</p>
<p>In short, the API needs to use that token to let the client application do what it needs to do with the resource.</p>
<p>This is the content of a decoded access token that follows the JWT format:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"iss"</span>: <span class="hljs-string">"https://YOUR_DOMAIN/"</span>,
  <span class="hljs-attr">"sub"</span>: <span class="hljs-string">"auth0|123456"</span>,
  <span class="hljs-attr">"aud"</span>: [
    <span class="hljs-string">"my-api-identifier"</span>,
    <span class="hljs-string">"https://YOUR_DOMAIN/userinfo"</span>
  ],
  <span class="hljs-attr">"azp"</span>: <span class="hljs-string">"YOUR_CLIENT_ID"</span>,
  <span class="hljs-attr">"exp"</span>: <span class="hljs-number">1489179954</span>,
  <span class="hljs-attr">"iat"</span>: <span class="hljs-number">1489143954</span>,
  <span class="hljs-attr">"scope"</span>: <span class="hljs-string">"openid profile email address phone read:appointments"</span>
}
</code></pre>
<p>Alright! Now you know what an ID token and an access token are.</p>
<p>The access token is a bearer token, meaning anyone who holds it can use it. It acts as a credential to access protected resources. If malicious users steal access tokens, they can access protected resources by presenting those tokens to the server.</p>
<p>To reduce this risk, it's crucial to have security strategies. One method is to <strong>create access tokens with a short lifespan, valid for only a few hours or days.</strong></p>
<p>When an access token expires, the client application can either prompt the user to log in again or use a <strong>refresh token</strong> to get a new access token from the authorization server.</p>
<p>Before we understand what is refresh token, an important concept is a short-lived token.</p>
<h3 id="heading-short-lived-tokens-great-for-security-bad-for-dx"><strong>Short-lived tokens - great for security; bad for DX 👎🏼</strong></h3>
<p>Short-lived tokens, as the name suggests, have a limited validity period. This limitation is crucial for several reasons:</p>
<ul>
<li><p><strong>Reduced Risk of Compromise:</strong> If a token is leaked, its short lifespan ensures that it quickly becomes useless to an attacker.</p>
</li>
<li><p><strong>Automatic Rotation:</strong> Systems can be designed to automatically issue new tokens at regular intervals, ensuring continuous security without manual intervention.</p>
</li>
<li><p><strong>Enhanced Traceability:</strong> Short-lived tokens can be logged and monitored more effectively, providing better insights into system access and usage patterns.</p>
</li>
</ul>
<h2 id="heading-refresh-tokens-bridge-between-security-amp-dx">Refresh tokens - Bridge between Security &amp; DX 🌉</h2>
<p>As mentioned, for security reasons, access tokens might only be valid for a short time. Once they expire, client apps can use a refresh token to <strong>refresh</strong> the access token. A refresh token is simply a credential that lets a client app get new access tokens without asking the user to log in again.</p>
<h2 id="heading-keeping-refresh-tokens-secure"><strong>Keeping Refresh Tokens Secure ✅</strong></h2>
<p>Short-lived access tokens boost our app's security, but there's a downside: when they expire, users need to log in again to get a new one. This frequent re-authentication can make your app seem annoying or hard to use, even if it's for their protection.</p>
<p>A refresh token can help you balance security with usability. Since refresh tokens usually last longer, you can use them to get new access tokens after the short-lived ones expire.</p>
<p>However, since refresh tokens are also bearer tokens, we need a plan to limit their use if they ever get leaked or compromised. Anyone holding the refresh tokens can get new access tokens whenever they want. "They" could be legitimate users or attackers.</p>
<p>To drive home the point about securing the refresh token, the recent <a target="_blank" href="https://blog.cloudflare.com/thanksgiving-2023-security-incident"><strong>Cloudflare breach</strong></a> underscores the importance of robust token management. When attackers exploited stolen credentials to access internal systems, the value of having a secure, centralized token management system became evident. By implementing a <strong>Security Token Service(STS)</strong>, organizations can better protect their resources against unauthorized access and minimize the risk of breaches.</p>
<p><mark>This is where </mark> <strong><mark>Tremolo security's </mark></strong> <a target="_blank" href="https://www.tremolosecurity.com/products/openunison"><strong><mark>OpenUnison</mark></strong></a><mark>comes into the picture.</mark></p>
<h2 id="heading-implementing-security-tokens-with-open-unison"><strong>Implementing Security Tokens with Open Unison</strong></h2>
<p>How does OpenUnison, a security token service, make token management secure?</p>
<p>OpenUnison works with GitOps systems like Argo CD and Flux CD to keep your tokens safe. When you're using these systems, it's super important to handle tokens for accessing repositories and clusters securely. OpenUnison does this by:</p>
<ul>
<li><p><strong>Issuing Short-Lived Tokens:</strong> Tokens are created with a short lifespan, so they don't stay around too long and reduce the risk of exposure.</p>
</li>
<li><p><strong>Token Validation:</strong> Tokens are checked to make sure they're being used by the right people. For example, if a pod using a token is deleted, the token stops working, which helps prevent unauthorized access.</p>
</li>
<li><p><strong>Token Rotation:</strong> Tokens are automatically changed regularly, so you're not stuck with static credentials. This ongoing rotation boosts security and lowers the chance of token leaks.</p>
</li>
</ul>
<blockquote>
<p><mark>What happens when you start doing cross-cluster stuff where you have multiple clusters?</mark></p>
<p><em>In environments with multiple clusters, Open Unison helps establish a common trust boundary by issuing tokens that are valid across clusters, facilitating secure communication and management.</em></p>
</blockquote>
<h2 id="heading-key-things-openunison-does-for-securing-tokens"><strong>Key Things OpenUnison Does for Securing Tokens 👀</strong></h2>
<ul>
<li><p><strong>Token Expiration:</strong> Make sure tokens don't last too long to cut down on the risk of unauthorized access.</p>
</li>
<li><p><strong>Automatic Rotation:</strong> Set up systems to automatically issue and rotate tokens so you don't have to rely on static credentials.</p>
</li>
<li><p><strong>Robust Validation:</strong> Use tools like OpenUnison to check tokens and make sure only the right people are using them.</p>
</li>
<li><p><strong>Monitoring and Logging:</strong> Keep logs of token usage to watch for any unusual activity.</p>
</li>
</ul>
<p>If you want to see some of this in action, check out this video of OpenUnison in action &amp; interesting conversation with <a target="_blank" href="https://twitter.com/mlbiam">Marc</a>, CTO @ <a target="_blank" href="https://twitter.com/tremolosecurity">Tremolo Security</a>, <a target="_blank" href="https://twitter.com/virtualized6ix">Marino</a>, and <a target="_blank" href="https://twitter.com/AakanshaPriya_">Aakansha</a>. Also, feel free to <a target="_blank" href="https://github.com/OpenUnison/openunison-k8s">follow the docs via GitHub</a>!</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/watch?v=9tM6eVqXWTA&amp;t=525s">https://www.youtube.com/watch?v=9tM6eVqXWTA&amp;t=525s</a></div>
<p> </p>
<p>Finally, we did a live stream on Namespace as a Service which was also an extension to security tokens. Catch the recording <a target="_blank" href="https://www.youtube.com/live/anpgM5mGaAI">here</a>!!!</p>
<p>Cheers and thanks for reading 😊!</p>
]]></content:encoded></item><item><title><![CDATA[Connecting the Dots: Understanding Networking in Cloud Native]]></title><description><![CDATA[Networking, as we all know, is the backbone of any modern technology. It allows communication between devices and applications, whether you are sitting next to each other or on opposite sides of the world. It's all about connecting things. If we talk...]]></description><link>https://blog.empathyops.io/connecting-the-dots-understanding-networking-in-cloud-native</link><guid isPermaLink="true">https://blog.empathyops.io/connecting-the-dots-understanding-networking-in-cloud-native</guid><category><![CDATA[networking]]></category><category><![CDATA[cloud native]]></category><category><![CDATA[containers]]></category><category><![CDATA[CNCF]]></category><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Aakansha Priya]]></dc:creator><pubDate>Mon, 15 Apr 2024 05:57:52 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1704257587368/958b46c5-a2b9-4158-a843-0a540cc5fd8b.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Networking, as we all know, is the backbone of any modern technology. It allows communication between devices and applications, whether you are sitting next to each other or on opposite sides of the world. It's all about connecting things. If we talk about it in the context of Kubernetes, it is even more important, because Kubernetes is a container orchestration platform, which means it's responsible for managing and scaling a large number of containers running in a cluster.</p>
<p>These containers need to be able to communicate with each other, as well as with the other parts of the infrastructure, such as external services and databases. Kubernetes networking allows this communication to happen seamlessly and securely. What makes Kubernetes network a challenge, is that it’s a very distributed network. There are a ton of “micro applications” running inside a cluster, and they all need their separate network configurations.</p>
<h1 id="heading-the-need-for-networking">The Need for Networking</h1>
<p>Before getting onto the way networks are handled in a cloud-native system such as Kubernetes, let us first try and understand why we even require robust networking.</p>
<p>Let’s say that we have a particular device. Now this device could be absolutely anything. It could be your Phone, your laptop, your smart TV, smart bulbs, or anything else. Every single one of these devices has its little internal network, and we may not have direct access to a device's internet network. And that's because it's a very highly customized and tuned network. After all, that network acts as a bus, where multiple components communicate with each other to effectively give some sort of output.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713160323423/69f99a72-690c-4170-ad81-ea04a2e36491.png" alt /></p>
<p>Now, what do I mean by these highly customized networks? Imagine an entire smart home setup. What are all your smart bulbs and smart TVs connected with? The answer is a network. It could be a wireless or a wired network. These networks have been configured in a very special way so that all these different devices can connect, and work seamlessly.</p>
<p>Let’s take another example. What happens when you access a YouTube video on your phone? Behind the scenes, there might be some inter-process communications going on. And it's happening in its little network before all of this data gets translated into a proper video format that you can understand. And this is the output that we see on a YouTube video.</p>
<p><img src="https://lh3.googleusercontent.com/uGHo1gsAL5XsNpspEws3ZUPDFFUNETfTfOt02Kjj_pWkwlOQ-C-I8SsNpA-MwtgU8eIeqB-0Ou7IWusMHcjdVS_T6BaZOxugA5e12HjQQ2ajIUGk1I7bpuhi5l4h55H1EBP51cQuLiXxh1r3XLoe4v4" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713160353479/5ecf79ff-34b2-45d0-aebc-c16109ccd04b.png" alt class="image--center mx-auto" /></p>
<p>So, once we go beyond our phone or the home network, we have different devices that need to be able to communicate with each other. And over nearly four decades worth of innovation, we've seen how networks have evolved and gone from being public, to private, and then again from private to public. But what are these special kinds of devices that enable us to communicate with people globally? That’s where we have some kind of an Intermediate Device that can help enable this kind of wide-area communication.</p>
<h1 id="heading-the-role-of-intermediate-devices">The Role of Intermediate Devices</h1>
<p>Your device right now is connected to some form of network. It might be a wireless network such as your cellular network which provides 5G connections, or it might be your home Wi-Fi network. What ends up happening is your device ends up talking to some sort of core device that knows how to get you and your device to other networks, to other locations, to other destinations, because your device doesn't know about the rest of the network.</p>
<p>There could be an entire big world beyond your device but it doesn't know about this global scale. So there are devices in between your device whether it’s your phone, your laptop, your TV, or anything else. The service that you are trying to access and those intermediary devices are moving your requests throughout the network to make sure they get to their destination in the fastest manner possible while still providing you with the result on time.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704257688917/46ae9da7-7deb-496b-adbd-8a77f0c84932.jpeg" alt class="image--center mx-auto" /></p>
<p>When it comes to these intermediary devices, the physical devices that exist at data centres, in cloud environments, at points of presence (POPs) or service provider locations they control a big aspect of the internet. Now, when we think about networks and the connectivity streams themselves, it's very, challenging to navigate or build on top of those existing networks because there are so many different constraints we have to consider. We need to consider factors such as what the physical world is doing, or the way the physical world moves our packets around.</p>
<p>Now, going back to those intermediary devices, let's call them routers and switches because they're effectively the ones responsible for moving packets around very quickly and knowing how to decide where to move those packets to is effectively the function of a router. A router is usually paired up with a switch so we can connect even more devices to a network.</p>
<h1 id="heading-cloud-native-networks">Cloud Native networks</h1>
<p>Now, let’s talk a bit about how networks are being handled in the cloud-native systems. When we get into the cloud native landscape, there are several different areas that we want to focus on. Those several different areas still depend on the physical network.</p>
<p>We talked about the importance of various devices such as routers and switches in a physical network, and how it connects the entire world. But now, let’s take a look at the cloud native and Kubernetes ecosystem.</p>
<p>Let’s say you want to provision a Kubernetes cluster on a cloud provider such as AWS, GCP or Civo. What happens when you press the “create cluster” button? What you can see, is the state of the cluster, and its nodes. We can’t see what’s going on in the background. However, if we dig around the cloud dashboards a bit, we can see exactly what’s going on.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713160386883/330f3b5e-beb8-4fff-8f7c-71311042f527.png" alt class="image--center mx-auto" /></p>
<p>The cloud provider is creating a couple of VMs, which will act as nodes for your clusters. It might also create some storage volumes depending on how you configured your cluster. And there might even be a brand new load balancer created. That’s all well and good, but the question that we have to ask is, how are all these different resources getting connected into this single Kubernetes cluster?</p>
<p>We already saw that we need to connect these tons of physical devices to create a network. So how is Kubernetes able to do it in such an automated way? If it needs physical networks to connect everything, then where are those physical devices that are connecting the cluster? Well, the answer is, there aren’t any physical devices. But the clusters are connected somehow.</p>
<h1 id="heading-virtual-networks">Virtual Networks</h1>
<p>This is where the entire concept of virtual networks comes into play. Before diving into virtual networks, let’s come back to the concept of virtualization. We know that Virtual machines and containers are created by a neat technology called as virtualization. This lets us split one physical computer into multiple virtual computers. You can think of it as a way to create multiple computers from a single computer’s hardware.</p>
<p>So, taking a short look at how virtualization is achieved. We have a host computer, i.e the physical computer. We install a piece of software on top of the physical computer which we call a Hypervisor. This hypervisor is what we use to create hundreds of virtual machines or containers i.e. split the physical computer into multiple sub-compters.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713160410496/0f1414a8-8b48-4f91-89ec-5171f3b08fe6.png" alt class="image--center mx-auto" /></p>
<p><img src="https://lh5.googleusercontent.com/8-53gXrYT2KErAwV3qtJqvylnqFlgHOu8gRceVEH3fF8NRsy_-Ec9ij9KGdJTCThrFiV_18RbTPiZ9Y_6CwQcFdaOtlQm13PCfRWeI1JlMQga58MUuiTXGOcUYN8XL7vZjs0QJ9LxOCx60JkzxwxaBI" alt /></p>
<p>Virtual networks follow the same concept. Instead of using multiple physical routers or physical switches, you can simply use one single powerful router or switch and split this into multiple smaller ones using virtualization. Now using these virtual networks, we can create hundreds or thousands of other networks to work with.</p>
<p>Now, before we look at the networks in a Kubernetes cluster, we need to look at one more thing. The Linux Kernel has an amazing feature called namespaces which essentially allows us to isolate processes. This is what containers use. Now, to separate networks, we have a network namespace as well. This simply separates the network, so on a single Linux host, you could have a lot of separate networks. All of these networks can have their own routers, switches, and other network interfaces. From a networking standpoint, every single container is just a network namespace</p>
<p>Now, we know that Kubernetes is a container orchestrator which means that at the end of it day, its job is to run containers. We also know that Kubernetes runs the containers inside tiny pods. For a Kubernetes environment, these pods are what we will be calling as the network namespaces.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713160425480/58548d14-4934-4fb1-a331-c45515cf9fb9.png" alt class="image--center mx-auto" /></p>
<p><img src="https://lh5.googleusercontent.com/D2d3WadHBaEWXq9gNiVMcl3dKY8BR8YdKX41Y7bpyYouS_pJE-Vmdfo3uEuzrrQECQnBErzWJxbgubJB8Zbjkg6VECcsOQQY2VREj7C5YfIntdEKDYGy9h81uaHRCrttc9s1_2uiHN4K0xIIGLif1uc" alt /></p>
<p>One thing that we need to highlight is that the entire paradigm of virtual networks is completely software-defined. That means we can very easily automate their creation, in contrast to if we were using physical interfaces to connect everything. That is where virtual networks are such a big and important aspect of Kubernetes and connecting the world.</p>
<p>Alright, so we have now created the virtual network namespaces and now the pods inside the cluster have a network that can connect to other networks. But how do we make sure that all these network namespaces connect to the correct networks? We already know that containers are ephemeral which means after some time, they will get destroyed and recreated. After they get recreated, the IP address assigned to them changes.</p>
<p>Since the IP address changes, we most certainly cannot use the IP address to define which other networks should they connect to. So, we’re going to need a DNS service within our Kubernetes cluster.</p>
<h1 id="heading-dns">DNS</h1>
<p>Before diving into DNS, let’s take a bit of an analogy. We all have phones. How do we make a phone call to another person? We have to dial their phone number. Now imagine if you had 100 friends who you talk with. You would need to memorize 100 different phone numbers. And even if you were able to do that, there is a chance that you enter a wrong phone number. So instead we have something like a phonebook, where we save the phone numbers along with the contact name.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713160442932/3f96d5e4-c226-4178-9cd4-f1b3d4a0383e.png" alt class="image--center mx-auto" /></p>
<p>A DNS works in the same way as a phonebook. It stores a bunch of IP addresses and assigns the proper names to those addresses. Let’s say you wanted to head over to <a target="_blank" href="http://google.com"><code>google.com</code></a>. You enter the URL in your browser and hit ENTER and the page loads. That’s great and all but what just happened?</p>
<p>On the backend, your browser saw that you wanted to go to <a target="_blank" href="http://google.com">google.com</a>, but it did not know what’s the IP address of this URL. So what it does, is it looks up the IP address of the entered URL in a DNS server. From there, it will match the URL with its IP address and once your browser knows which IP address <a target="_blank" href="http://google.com">google.com</a> exists, it will take you there.</p>
<p>Since in a Kubernetes environment everything is ephemeral, relying on hardcoded IP addresses will not work. Hence we need a DNS service that can automatically detect the newly created networks and assign them the proper name. In a Kubernetes cluster, you would usually see CoreDNS as the most common DNS service. However, DNS is only part of the story when it comes to enabling the pods to communicate. The other half of the story is Kubernetes Services. First, let’s take a look at what is a Container Networking Interface (CNI).</p>
<h1 id="heading-container-networking-interface-cni">Container Networking Interface (CNI)</h1>
<p>In the previous section, we mentioned that the DNS services make sure that the recreated network is reachable. But when this network is created or re-created, what assigns it the IP address in the first place?</p>
<p>To create a standardized way to handle networks in Kubernetes, there was a specification which was introduced called as the Container Networking Interface(CNI). This specification is just a bunch of rules and principles that need to be followed when we create a networking solution for a Kubernetes cluster.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713160456787/85575255-7e8d-48ac-8653-9cba4d31c542.png" alt class="image--center mx-auto" /></p>
<p>Various CNI plugins have been created and refined over the years. Some of the popular examples of these CNI plugins include Calico, Cillum and Flannel. They all do essentially the same tasks, but each one of these CNI plugins has its way of doing things and might provide different features.</p>
<h1 id="heading-kubernetes-services">Kubernetes Services</h1>
<p>Now, for the Kubernetes pods to be able to communicate with each other, we need to expose those individual pods through Kubernetes objects that we call a service. In the most simple terms, a service is a way to enable the pod to communicate either with the outside world or with other pods. There are a total of three main types of services. Let’s take a look at them in brief.</p>
<ul>
<li><p><strong>ClusterIP:</strong> A clusterIP service is just a way to allow pods to communicate with other pods inside the cluster. It’s an internal network for the pods.</p>
</li>
<li><p><strong>NodePort:</strong> NodePort just ties your pod to a specific node. This can be limiting because your nodes can come and go pretty easily, and you don't want to be in a situation where you lose a node. If that happens, you've lost access to your app.</p>
</li>
<li><p><strong>Loadbalancer:</strong> A load balancer will just decide how to distribute the incoming traffic across the available Kubernetes nodes. Duplicates of one pod can exist on different nodes as well, and a load balancer will help distribute the traffic among those copies.</p>
</li>
</ul>
<p>A service in Kubernetes is an actual way to translate DNS. It's not directly called DNS, but it's a way to translate DNS into pod IPs. They use a concept of labels and selectors to effectively map the service to specific pods that you might have deployed.</p>
<p>Once we have these pieces in the mix, we’ve got pretty much everything we need to get going for a Kubernetes cluster. There are still a few elements that we are missing for security considerations. And that is where we would use things like a Service Mesh, or an API gateway. They are all huge topics in themselves, so let’s take a high-level overview of them.</p>
<h1 id="heading-service-mesh"><strong>Service Mesh</strong></h1>
<p>Before delving into service mesh, it's essential to understand how applications communicate. Typically, we interact with applications via HTTP rather than directly pinging their IP addresses. HTTP is simply a protocol that you can use for communications. Service A communicates with Service B, often using HTTP requests like GET to retrieve data. This communication can involve other protocols, but HTTP is predominant.</p>
<p>HTTP operates at layer 7 of the OSI model, encompassing all network layers, from the physical to the application layer. While the network layer primarily focuses on routing, it lacks the intelligence necessary for sophisticated operations.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713160473920/5f7ef919-98f8-4623-9feb-b05df235e1c9.png" alt class="image--center mx-auto" /></p>
<p>Layer 7 offers substantial benefits, such as the ability to pass authentication tokens, filter requests, and even control access through rate limiting. Filtering at the IP or hostname level, or lower layers, is limited in this regard. Layer 7 also introduces identity and authorization, enhancing security.</p>
<p>Service mesh builds on these concepts, deploying a control plane that interacts with the Kubernetes control plane and influences the architecture. The data plane, existing as proxies within Kubernetes, facilitates routing, filtering, and authorization. An ingress gateway (incoming traffic) and an egress gateway (outgoing traffic) control traffic in and out of the cluster, while mini proxies within the cluster manage individual services.</p>
<p>Service mesh not only adds intelligence to routing but also assists with blue-green deployments, canary launches, and resilience. It enables circuit breaking to mitigate failures within an application, ensuring partial functionality. Kubernetes takes charge of reconciliation, automatically correcting deviations from the desired state.</p>
<p>Kubernetes communicates with cloud providers' APIs to handle node failures, reprovisioning nodes when needed. This process automates networking, from the physical layer to the service mesh, offering a seamless experience. This automation extends to cloud providers like AWS, where clusters, load balancers, and EC2 instances are provisioned behind the scenes.</p>
<h1 id="heading-api-gateway">API Gateway</h1>
<p>An API gateway typically sits atop a load balancer, where the load balancer listens for external requests while the API gateway handles request processing logic. This concept predates Kubernetes and is versatile, and applicable to various environments, including VMs, functions, containers, or external entities.</p>
<p>The API gateway serves as the primary entry point to access APIs, similar to a service mesh but centralized at the cluster or environment edge. In essence, a service mesh is an evolution of the API gateway, running universally across all workloads and offering the same capabilities.</p>
<p>As your needs evolve, transitioning from an API gateway to a service mesh may be necessary, especially when dealing with intricate service-to-service communication and dependencies.</p>
<p>In today's Kubernetes-centric landscape, service meshes like Istio accommodate both VM and Kubernetes workloads, serving as the API front end for both.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713160506547/99327306-0571-452f-8739-2b7f5d447a60.png" alt class="image--center mx-auto" /></p>
<p>However, in purely virtual machine environments, sticking with API gateways might be more fitting due to service coupling and functionality considerations.</p>
<p>API gateways provide additional features like rate limiting, which ensures that services don't get overwhelmed by limiting the number of incoming requests over time. This prevents service outages caused by a sudden influx of requests.</p>
<p>Additionally, API gateways act as front doors and can function as web application firewalls, filtering inbound traffic based on policies. They can also handle TLS termination and authentication, simplifying the authentication process by connecting with other systems seamlessly.</p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>In summary, networking is the backbone of modern technology, enabling communication across devices and applications. Within Kubernetes, a dynamic container orchestration platform, networking takes centre stage, allowing containers to interact seamlessly. This article explores the critical role of networking in Kubernetes and the solutions it employs.</p>
<p>Kubernetes faces the challenge of managing myriad microapplications, each with unique network requirements. To address this, it harnesses virtual networks and Container Networking Interfaces (CNI) for automated network management. These virtual networks adapt to the ever-changing container landscape, ensuring uninterrupted communication.</p>
<p>DNS services are crucial for translating human-readable URLs into IP addresses and facilitating pod communication within clusters. Kubernetes services, including ClusterIP, NodePort, and LoadBalancer, further enhance connectivity for internal and external traffic.</p>
<p>To address advanced networking and security needs, Kubernetes offers service meshes and API gateways. Service meshes like Istio enable intelligent routing, filtering, authorization, and support features like blue-green deployments. API gateways serve as centralized entry points, handling tasks like rate limiting, web application firewall functionality, TLS termination, and authentication.</p>
<p>As Kubernetes continues to shape the cloud-native landscape, mastering its networking intricacies is pivotal for organizations seeking reliability, security, and scalability in their applications and services.</p>
<p>Thanks for reading!</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://media.giphy.com/media/KvAKXViNfpU8fSDiF0/giphy.gif">https://media.giphy.com/media/KvAKXViNfpU8fSDiF0/giphy.gif</a></div>
<p> </p>
<p>If you liked this blog, feel free to share it with your fellow companions and stay updated with the latest developments in Cloud Native networking by following us on Twitter at <a target="_blank" href="https://twitter.com/EmpathyOps">EmpathyOps</a> and checking out our <a target="_blank" href="https://empathyops.io/">website</a>!</p>
]]></content:encoded></item><item><title><![CDATA[Power of MicroVMs: Bridging the Gap Between Containers and VMs]]></title><description><![CDATA[In the ever-evolving landscape of cloud computing and virtualization, technology continually seeks to find the perfect balance between security, performance, and resource efficiency. One such innovation that has garnered attention recently is the con...]]></description><link>https://blog.empathyops.io/power-of-microvms-bridging-the-gap-between-containers-and-vms</link><guid isPermaLink="true">https://blog.empathyops.io/power-of-microvms-bridging-the-gap-between-containers-and-vms</guid><category><![CDATA[microvm]]></category><category><![CDATA[containers]]></category><category><![CDATA[cloud native]]></category><category><![CDATA[virtual machine]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[Aakansha Priya]]></dc:creator><pubDate>Mon, 11 Mar 2024 03:30:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1704256734332/7237adbf-82c1-4207-a021-7e5543177aa4.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the ever-evolving landscape of cloud computing and virtualization, technology continually seeks to find the perfect balance between security, performance, and resource efficiency. One such innovation that has garnered attention recently is the concept of MicroVMs. In this blog post, we will explore what MicroVMs are, how they work, why they matter, and their use cases.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://media.giphy.com/media/Vh3d0zJ4FrPeA7lTB4/giphy.gif">https://media.giphy.com/media/Vh3d0zJ4FrPeA7lTB4/giphy.gif</a></div>
<p> </p>
<h2 id="heading-what-are-microvms"><strong>What are MicroVMs?</strong></h2>
<p>At its core, a MicroVM is a lightweight virtual machine designed to provide security and isolation akin to traditional VMs while maintaining the resource efficiency of containers. Unlike traditional virtualized or emulated computer systems, MicroVMs are optimized for specific tasks and have a minimal attack surface.</p>
<h3 id="heading-key-features-of-microvms"><strong>Key Features of MicroVMs</strong></h3>
<ol>
<li><p><strong>Security:</strong> MicroVMs achieve security through the use of cgroups and seccomp BPF, ensuring that all processes are isolated and restricted, reducing the risk of security breaches.</p>
</li>
<li><p><strong>Speed:</strong> These tiny virtual machines are incredibly fast, with benchmarks boasting less than 125ms to launch 150 MicroVMs per second.</p>
</li>
<li><p><strong>Scale and Efficiency:</strong> MicroVMs have a memory footprint smaller than 5MiB, allowing for a high degree of consolidation on a single server, leading to resource efficiency.</p>
</li>
</ol>
<h2 id="heading-supported-devices"><strong>Supported Devices</strong></h2>
<p>MicroVMs are designed to support a limited set of devices, following a philosophy of "less is more." They prioritize paravirtualization and use Virtio devices, which can significantly reduce hypervisor bloat and result in faster startup times. The devices emulated can vary depending on the specific implementation.</p>
<h2 id="heading-anatomy-of-a-microvm"><strong>Anatomy of a MicroVM</strong></h2>
<ol>
<li><p><strong>Volumes:</strong> Each MicroVM requires a root volume to boot. These volumes are typically implemented as rawfs files or block devices. While working with volumes can be cumbersome, overlay filesystems and device mappers can simplify the process.</p>
</li>
<li><p><strong>No BIOS or Bootloader:</strong> Depending on the implementation, MicroVMs may not have a BIOS or bootloader. Instead, the kernel executes directly.</p>
</li>
<li><p><strong>API Server:</strong> Most MicroVM implementations come with a built-in API server accessible via a socket. This allows for configuration and operational actions on the MicroVM instances.</p>
</li>
<li><p><strong>Metadata Service:</strong> Some implementations offer a metadata service similar to AWS's instance metadata service. This enables the transfer of information from the host to the guest, making it useful for cloud-init and passing secrets.</p>
</li>
</ol>
<p><img src="https://lh5.googleusercontent.com/GqOVgx14gNWLVCvHpky04iyoeUlwGvESqznkKrhiNMIxDSFlCCjdpdGcUvsBg6Jwhd_QcRplI400nvIZwLuPkAGFWyOCJpdQ3BNzmFNLdI7aOR3euufCtTyjvTVlXT18c8OpPkMKdeWpMvUxizE3zhU" alt="Image credit: Firecracker website" /></p>
<h2 id="heading-why-should-you-care-about-microvms"><strong>Why Should You Care About MicroVMs?</strong></h2>
<p>MicroVMs offer a compelling solution for maximizing resource utilization on your infrastructure. By reducing overhead and maintaining strong security and isolation, they enable you to run more workloads on the same hardware.</p>
<h3 id="heading-use-cases"><strong>Use Cases</strong></h3>
<ol>
<li><p><strong>Workload Isolation:</strong> MicroVMs provide superior isolation compared to containers, making them ideal for workloads with regulatory, operational, or data privacy requirements.</p>
</li>
<li><p><strong>Isolated Build Pipelines/Runners:</strong> MicroVMs can be used to create isolated environments for building and testing code, enhancing security and reproducibility.</p>
</li>
<li><p><strong>Short-Lived Testing/Preview Environments:</strong> When you need to quickly spin up test environments for software development or testing, MicroVMs offer a lightweight and efficient solution.</p>
</li>
<li><p><strong>Short-Lived Jobs:</strong> Tasks like data processing or batch jobs can benefit from the fast startup times and efficient resource usage of MicroVMs.</p>
</li>
</ol>
<h2 id="heading-microvm-implementations"><strong>MicroVM Implementations</strong></h2>
<p>There are two primary MicroVM implementations worth mentioning:</p>
<h3 id="heading-1-firecracker-fc"><strong>1. Firecracker (FC)</strong></h3>
<ul>
<li><p>Developed by AWS</p>
</li>
<li><p>Designed for ephemeral compute</p>
</li>
<li><p>Smallest device model</p>
</li>
<li><p>Utilizes the Jailer for increased security</p>
</li>
<li><p>Linux guests only</p>
</li>
</ul>
<h3 id="heading-2-cloud-hypervisor-ch"><strong>2. Cloud Hypervisor (CH)</strong></h3>
<ul>
<li><p>Developed by Intel, Alibaba, and others</p>
</li>
<li><p>Offers a more generalized and feature-rich approach</p>
</li>
<li><p>Supports a larger device model, including PCI and more Virtio devices</p>
</li>
<li><p>Suitable for both Linux and Windows guests</p>
</li>
</ul>
<p>To better understand where MicroVMs fit into the virtualization landscape, let's compare them to containers and traditional VMs:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1696273083426/c97ab287-0540-4dc2-9496-3fbf26eacc9b.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-microvms"><strong>MicroVMs</strong></h3>
<ul>
<li><p><strong>Design:</strong> Lightweight isolated virtual machines with their own kernel, guest operating system, and virtualized hardware.</p>
</li>
<li><p><strong>Isolation:</strong> Provide strong isolation, with each MicroVM running in its own virtual machine instance.</p>
</li>
<li><p><strong>Performance:</strong> Offer small overhead compared to traditional VMs and quick startup times.</p>
</li>
<li><p><strong>Use Cases:</strong> Ideal for running untrusted and multi-tenant workloads that require strong isolation and security.</p>
</li>
</ul>
<h3 id="heading-containers"><strong>Containers</strong></h3>
<ul>
<li><p><strong>Design:</strong> Lightweight, isolated runtime environments that share a host operating system kernel.</p>
</li>
<li><p><strong>Isolation:</strong> Provide application-level isolation, sharing the underlying host operating system and kernel.</p>
</li>
<li><p><strong>Performance:</strong> Efficient resource utilization and rapid startup times by leveraging the host operating system and resources directly.</p>
</li>
<li><p><strong>Use Cases:</strong> Great for deploying and managing applications consistently across different environments, with a focus on scalability and agility.</p>
</li>
</ul>
<h3 id="heading-traditional-vms"><strong>Traditional VMs</strong></h3>
<ul>
<li><p><strong>Design:</strong> Full-fledged virtualized instances of physical hardware.</p>
</li>
<li><p><strong>Isolation:</strong> Provide complete isolation between the host system and the guest operating system.</p>
</li>
<li><p><strong>Performance:</strong> Higher resource overhead compared to containers, with slightly longer startup times.</p>
</li>
<li><p><strong>Use Cases:</strong> Suitable for scenarios that demand complete isolation between workloads.</p>
</li>
</ul>
<p>In summary, MicroVMs combine the strengths of both containers and traditional VMs while mitigating their respective disadvantages. They offer isolation and security similar to VMs while maintaining the efficiency and rapid deployment capabilities of containers.</p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>MicroVMs are transforming the serverless space, allowing cloud providers to run more workloads with less overhead. They provide the security and isolation of traditional virtual machines while offering the resource efficiency and rapid deployment capabilities of containers. As technology continues to evolve, MicroVMs prove to be a promising solution for a wide range of use cases in the world of cloud computing and virtualization.</p>
<p>Also, check out some <strong>end-user testimonials</strong></p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://twitter.com/edouardb_/status/1699077425559171373?s=20">https://twitter.com/edouardb_/status/1699077425559171373?s=20</a></div>
<p> </p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.koyeb.com/blog/10-reasons-why-we-love-firecracker-microvms">https://www.koyeb.com/blog/10-reasons-why-we-love-firecracker-microvms</a></div>
<p> </p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://twitter.com/slpnix/status/1704413076320117096?s=20">https://twitter.com/slpnix/status/1704413076320117096?s=20</a></div>
<p> </p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://twitter.com/alexellisuk/status/1583089248084729856?s=20">https://twitter.com/alexellisuk/status/1583089248084729856?s=20</a></div>
<p> </p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://twitter.com/selfactuated/status/1668575246952136704?s=20">https://twitter.com/selfactuated/status/1668575246952136704?s=20</a></div>
<p> </p>
<p>Thank you for reading!</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://media.giphy.com/media/ZfK4cXKJTTay1Ava29/giphy.gif">https://media.giphy.com/media/ZfK4cXKJTTay1Ava29/giphy.gif</a></div>
<p> </p>
<p>If you liked this blog, feel free to share it with your fellow companions and stay updated with the latest developments in Cloud Native networking by following us on Twitter at <a target="_blank" href="https://twitter.com/EmpathyOps">EmpathyOps</a> and checking out our <a target="_blank" href="https://empathyops.io/">website</a>!</p>
]]></content:encoded></item><item><title><![CDATA[Authentication Security Primer (for Cloud Native and friends!)]]></title><description><![CDATA[TL;DR:

There's so much to security especially around the perimeter with various entry points into infrastructure and our applications

SSO, IAM, and RBAC granularize the approach to defense-in-depth ensuring streamlined authentication and authorizat...]]></description><link>https://blog.empathyops.io/authentication-security-primer-for-cloud-native-and-friends</link><guid isPermaLink="true">https://blog.empathyops.io/authentication-security-primer-for-cloud-native-and-friends</guid><category><![CDATA[cloud native]]></category><category><![CDATA[technology]]></category><category><![CDATA[Security]]></category><category><![CDATA[authentication]]></category><category><![CDATA[IAM]]></category><category><![CDATA[SSO]]></category><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Aakansha Priya]]></dc:creator><pubDate>Mon, 22 Jan 2024 14:00:42 GMT</pubDate><content:encoded><![CDATA[<p><strong><em>TL;DR:</em></strong></p>
<ul>
<li><p><em>There's so much to security especially around the perimeter with various entry points into infrastructure and our applications</em></p>
</li>
<li><p><em>SSO, IAM, and RBAC granularize the approach to defense-in-depth ensuring streamlined authentication and authorization</em></p>
</li>
<li><p><em>OpenUnison simplifies the SSO process, MyVirtualDirectory aggregates multiple identity sources, Kubernetes authentication magic thanks to Tremolo Security</em></p>
</li>
</ul>
<p>In the rapidly advancing digital era, businesses are transitioning from traditional on-premises IT infrastructures to cloud-native environments to enhance agility, scalability, and efficiency. However, this shift also brings about a significant transformation in the security landscape. In this blog, we will explore the security challenges that traditionally existed and how they are being addressed in the cloud-native paradigm.</p>
<p>Let’s rewind a couple of years. We were running all physical hardware, and we had physical access to almost everything that ran our business. There weren’t the overly complicated concepts of cloud and distributed environments. Everyone who needed to do anything always did it in person from offices.</p>
<p>Fast forward to the present day, and everyone prefers the cloud over owning all their physical servers, even if you’ve got physical servers, you have to deal with the problems you’d face on the cloud. Distributed computing has become a widespread adoption, folks are working from all over the world and from different timezones.</p>
<p>All these changes, in various domains, have also introduced many security risks, and have forced us to rethink how we do security. Let’s take a look at some of the technicalities of what security systems used to be like, and how they’ve evolved for modern-day problems</p>
<h3 id="heading-perimeter-security-model">Perimeter Security Model</h3>
<p>In a much more traditional era, organizations relied on a perimeter defence model, envisioning their networks as castles surrounded by moats. This model assumed that all entities within the internal network were trustworthy, granting unrestricted access. However, this approach had significant limitations:</p>
<ul>
<li><p><strong>Lack of Granular Control:</strong> Perimeter security assumed every device within the network was trusted, lacking granular control. This vulnerability exposed organizations to threats like credential leaks, human errors, insider attacks, and infected devices.</p>
</li>
<li><p><strong>Globalization and Remote Work:</strong> As a response to the shortcomings of the perimeter security model, <strong>Zero Trust Security</strong> emerged as a revolutionary paradigm. This approach challenges the default trust placed in internal networks, requiring continuous verification before granting access.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704477007486/44030b04-7c21-4c69-87c0-39803bf70f39.png" alt class="image--center mx-auto" /></p>
<p>Image credits: istockphoto</p>
<h3 id="heading-understand-zero-trust-security">Understand Zero Trust Security</h3>
<p>Now, let’s understand what exactly is Zero Trust in a game-based scenario.</p>
<p>Imagine the digital world is like a big, bustling city, and everyone needs a special ID to get in. Now, enter our superhero, Zero Trust Security – the guardian of this city. Our hero has three special tasks to perform</p>
<ol>
<li><p><strong>Identity Verification:</strong> Just like showing your ID at the city gate, Zero Trust makes sure everyone entering is who they say they are. It's like meeting new friends and making sure they're cool before inviting them to play in the city.</p>
</li>
<li><p><strong>Least Privilege Access:</strong> Think of this as giving keys to different rooms in your favourite game. Zero Trust makes sure everyone has the right keys for the tasks they need to do. No unnecessary keys – just like having access to the parts of the game you need to win.</p>
</li>
<li><p><strong>Assume Breach:</strong> Picture a castle with secret passages and guards. Zero Trust acts like those guards, dividing the city into safe zones. Even if a mischievous character sneaks in, they can't go far. It's like having secret codes to protect the city from anything mischievous.</p>
</li>
</ol>
<p>Now, our superhero Zero Trust has decided to visit a special place called Kubernetes – like a playground for all digital games. Here, Zero Trust uses special tools, just like magical powers, to keep everything safe. It's like having a superhero team for each game, making sure no one cheats or plays unfairly.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704477033457/2a6c7354-444f-47f8-9c81-b01bb04f6a5c.png" alt class="image--center mx-auto" /></p>
<p>Image credits: quick launch</p>
<p>So, you see, Zero Trust is like the coolest superhero, making sure our digital city and playgrounds are always safe and fun. It's like having a friend who watches out for us in the big, exciting world of computers and internet adventures.</p>
<p>So, in the modern world <strong>Zero Trust</strong> offers these benefits:</p>
<ol>
<li><p><strong>Enhanced Security:</strong></p>
<ul>
<li>Zero Trust reduces the attack surface, enables faster threat detection, and minimizes the impact of breaches through continuous verification.</li>
</ul>
</li>
<li><p><strong>Improved User Experience</strong></p>
<ul>
<li>Zero Trust simplifies user access across different devices and locations, enhancing productivity and satisfaction.</li>
</ul>
</li>
<li><p><strong>Increased Agility and Innovation</strong></p>
<ul>
<li>By providing a flexible and scalable security framework, Zero Trust supports digital transformation, cloud migration, and the adoption of new technologies without compromising security.</li>
</ul>
</li>
</ol>
<p>In conclusion, Zero Trust Security represents a paradigm shift from the traditional castle-and-moat approach, offering enhanced security, improved user experience, and increased agility in the dynamic landscape of modern networks and Kubernetes environments.</p>
<p>Different security models help secure your infrastructure and prevent malicious actors from gaining access. Let’s talk about some of those.</p>
<h3 id="heading-single-sign-on-sso">Single Sign On (SSO)</h3>
<p>In the dynamic realm of the internet, where users navigate an ever-expanding array of websites and services, the demand for seamless authentication has never been higher. Single sign-on is the answer!</p>
<p><strong>What is SSO Authentication?</strong></p>
<p>SSO is the key to unlocking effortless logins across multiple domains. It tackles the challenge posed by the same-origin policy, offering a solution to share session information securely.</p>
<p><strong>How SSO Works</strong></p>
<ol>
<li><p><strong>Centralized Token Generation</strong></p>
<ul>
<li><p>A central domain creates a secure token (e.g., JSON Web Token).</p>
</li>
<li><p>This token becomes the golden key for user authentication across various domains.</p>
</li>
</ul>
</li>
<li><p><strong>Seamless User Authentication</strong></p>
<ul>
<li><p>Users logged in at one domain are automatically recognized and authenticated at others.</p>
</li>
<li><p>Overcomes the limitations of sharing session data imposed by browser policies.</p>
</li>
</ul>
</li>
</ol>
<p><strong>Scenario without SSO – Juggling Multiple Credentials</strong></p>
<p>Picture yourself working in a dynamic company that relies on various applications for daily operations. Each application, from email to project management and document collaboration, has its own login credentials. You find yourself juggling usernames and passwords throughout the day. This process not only slows you down but also leads to occasional password resets and the constant fear of forgetting one of the numerous credentials.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704477055632/12e78e2d-878f-4ad3-8364-6ae84ad17a78.png" alt class="image--center mx-auto" /></p>
<p>Image credit: auth0</p>
<p><strong>Enter Single Sign-On : Streamlining Access</strong></p>
<p>Now, the company has decided to implement Single Sign-On (SSO). It's like upgrading from a ring of separate keys for every door to a single master key. With SSO, you log in once, and it serves as your access pass to all the applications you need. No more juggling credentials, no more forgotten passwords. It's a seamless transition into your daily tasks without the friction of repetitive logins.</p>
<p><strong>Benefits Unveiled</strong></p>
<ol>
<li><p><strong>Enhanced User Experience</strong></p>
<ul>
<li>Your workday becomes a breeze as you log in once, and all applications recognize you. No more navigating through different login screens, making the overall experience smoother and more enjoyable.</li>
</ul>
</li>
<li><p><strong>Centralized Security</strong></p>
<ul>
<li>Previously, managing multiple credentials meant an increased risk of security breaches. With SSO, the security focus shifts to safeguarding that single entry point, enhancing overall security and reducing the risk associated with managing multiple sets of credentials.</li>
</ul>
</li>
<li><p><strong>Simplified User Management</strong></p>
<ul>
<li>From an administrative standpoint, onboarding and offboarding employees become more straightforward. Access is granted or revoked centrally, eliminating the need to update credentials across various platforms. This centralized approach ensures a more organized and efficient user management process.</li>
</ul>
</li>
</ol>
<p>In this scenario, the adoption of Single Sign-On transforms a cumbersome and less secure environment into a streamlined, secure, and user-friendly digital workspace.</p>
<h3 id="heading-iam-safeguarding-the-digital-gateway"><strong>IAM: Safeguarding the Digital Gateway:</strong></h3>
<p>IAM is more than just a set of policies and technologies—it's a robust framework designed to manage and control user identities and access privileges effectively. By serving as the gatekeeper to organizational resources, IAM establishes a foundation for information security, offering secure and controlled access to systems, applications, data, and even physical facilities.</p>
<p><strong>Key Components of IAM:</strong></p>
<ol>
<li><p><strong>Identity Management:</strong></p>
<ul>
<li><p>Efficiently administers user identities, from provisioning to de-provisioning.</p>
</li>
<li><p>Mitigates security and compliance risks by ensuring accurate user data.</p>
</li>
</ul>
</li>
<li><p><strong>Authentication:</strong></p>
<ul>
<li><p>Verifies user identities through methods like passwords, multi-factor authentication, and biometrics.</p>
</li>
<li><p>Enforces password policies to enhance security.</p>
</li>
</ul>
</li>
<li><p><strong>Authorization:</strong></p>
<ul>
<li><p>Dictates access privileges based on roles, permissions, and policies.</p>
</li>
<li><p>Utilizes Role-Based Access Control (RBAC) models for efficient authorization management.</p>
</li>
</ul>
</li>
<li><p><strong>Single Sign-On (SSO):</strong></p>
<ul>
<li><p>Enhances user experience by allowing access to multiple applications with a single set of credentials.</p>
</li>
<li><p>Streamlines the login process and reduces the burden of managing multiple passwords.</p>
</li>
</ul>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704477078992/70f8667a-37ed-46cc-9cbf-2032f3dcbf3a.png" alt class="image--center mx-auto" /></p>
<p>Image credits: AWS</p>
<p><strong>Benefits of IAM Implementation:</strong></p>
<ol>
<li><p><strong>Rock-Solid Security Shield:</strong></p>
<ul>
<li>Imagine IAM as an impregnable fortress, keeping out unwanted guests and securing your data. It ensures your sensitive information stays safe, preserving its integrity, confidentiality, and constant availability.</li>
</ul>
</li>
<li><p><strong>Compliance Made Easy:</strong></p>
<ul>
<li>IAM acts like a trusty guide in the maze of regulations. It ensures you follow data protection rules with ease, making audits a breeze and compliance reporting a smooth operation.</li>
</ul>
</li>
<li><p><strong>Effortless User Access Control:</strong></p>
<ul>
<li>Think of IAM as a conductor leading an orchestra of user access. It simplifies managing identities, reducing the admin workload. IAM's coordination ensures smooth account setups, streamlined access, and automated user processes.</li>
</ul>
</li>
<li><p><strong>Boosting Productivity:</strong></p>
<ul>
<li>IAM is the key to a more productive work environment. With features like Single Sign-On, forget the hassle of multiple passwords. It frees up time and energy, allowing users to focus on what matters.</li>
</ul>
</li>
</ol>
<p><strong>Challenges in IAM Implementation:</strong></p>
<p>While identity management does have its advantages, and security benefits, it’s not without its challenges. Let’s quickly get an overview of some of the challenges that are introduced with IAM.</p>
<ol>
<li><p><strong>Identity Lifecycle Management:</strong></p>
<ul>
<li><p>Crucial for managing the entire lifecycle of user identities.</p>
</li>
<li><p>Minimizes inaccuracies in user data to reduce security and compliance risks.</p>
</li>
</ul>
</li>
<li><p><strong>Authentication Security Concerns:</strong></p>
<ul>
<li><p>Ongoing challenges in maintaining secure authentication methods.</p>
</li>
<li><p>Emphasis on robust measures like multi-factor authentication.</p>
</li>
</ul>
</li>
<li><p><strong>Integration Hurdles:</strong></p>
<ul>
<li><p>Seamless integration with existing systems poses challenges.</p>
</li>
<li><p>Careful planning and adaptable IAM solutions are crucial for overcoming integration hurdles.</p>
</li>
</ul>
</li>
</ol>
<p>IAM is not just a tool; it's a dynamic landscape offering solutions that adapt to modern cybersecurity challenges. Successful implementation establishes a robust framework, ensuring secure, efficient, and scalable digital environments. IAM remains a critical component for access control, risk mitigation, and protection of valuable digital assets.</p>
<h3 id="heading-rbac-role-based-access-control"><strong>RBAC (Role-based Access Control )</strong></h3>
<p>Let’s try to understand RBAC in the form of a story.</p>
<p>Imagine you work in a bustling office building with multiple floors, each floor hosting different departments and sensitive information. Now, let's say your office decides to implement a system to control and monitor access, ensuring that employees can only enter areas relevant to their roles. This system is the real-world equivalent of Role-Based Access Control (RBAC).</p>
<p>Picture yourself as an employee – let's call you Alex. You have a specific role in the company, and you only need access to certain floors and departments to do your job effectively. This is where RBAC steps in as the office security guard.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704477101423/4cd7a2bf-3ae4-4a53-ae14-a26021c518a8.png" alt class="image--center mx-auto" /></p>
<p>Image credits: wallarm</p>
<p>When you arrive at the office entrance (authentication), you provide your ID to confirm your identity. Once verified, RBAC takes over. It's like a personalized guide that directs you only to the floors and rooms you're authorized to enter based on your role and responsibilities.</p>
<p>For instance, if you're in the finance department, you'll have access to financial records on Level 5, but you won't be able to enter the research and development area on Level 3. RBAC ensures that every employee can perform their tasks smoothly within their designated areas but prevents them from wandering into spaces where they don't belong.</p>
<p>Without RBAC, chaos could ensue. Employees might accidentally stumble into restricted zones, potentially exposing sensitive information or disrupting workflows. RBAC, represented by a set of rules, acts like the invisible hand guiding employees through the office maze.</p>
<p>In this real-world scenario, RBAC is the behind-the-scenes hero, making sure everyone can navigate the office seamlessly while maintaining the security and confidentiality needed for a smooth work environment. It's the tool that empowers employees to access what they need and safeguards against unauthorized entry into sensitive spaces.</p>
<p><strong>Challenges in Multi-cluster RBAC Management:</strong></p>
<p>Like any piece of technology, RBAC has its challenges as well. These challenges are even greater recognized once we start increasing scale. Whether it’s the scale of organizations, applications, or infrastructure. Let’s try and quickly understand some of these challenges.</p>
<ol>
<li><p><strong>Role Explosion:</strong></p>
<ul>
<li><p>A growing number of roles for various users and groups.</p>
</li>
<li><p>Administration becomes challenging due to an increasing complexity of privileges.</p>
</li>
</ul>
</li>
<li><p><strong>Complexity and Scalability:</strong></p>
<ul>
<li><p>Challenges in managing relationships between numerous roles and permissions.</p>
</li>
<li><p>The lack of native tools for synchronization hampers comprehension.</p>
</li>
</ul>
</li>
<li><p><strong>Lack of Holistic View:</strong></p>
<ul>
<li><p>Kubectl provides granular information but lacks a comprehensive overview.</p>
</li>
<li><p>Understanding how different roles are used across clusters becomes difficult.</p>
</li>
</ul>
</li>
<li><p><strong>Imperative Execution:</strong></p>
<ul>
<li><p>Manual execution of kubectl commands prone to errors.</p>
</li>
<li><p>Time-consuming updates without continuous synchronization.</p>
</li>
</ul>
</li>
</ol>
<h2 id="heading-a-single-solution-to-our-access-security-problems">A single solution to our access security problems?</h2>
<p>Now that we’ve got a good understanding of some of the history of security and some of the modern paradigms and problems with them, let’s think about how we can start solving these problems.</p>
<p>Instead of building our solutions from scratch, why not try and leverage what someone else has already built? Surely that saves us the effort of learning the deep intricacies and implementing things ourselves. I’m going to specifically talk about <a target="_blank" href="https://www.tremolosecurity.com/">Tremolo</a>, the security company for everything related to access management.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704477710516/3b1c14e7-9d8b-485e-8626-5faddb56fd9f.png" alt class="image--center mx-auto" /></p>
<p>Image Credits: TremoloSecurity website</p>
<p>Let’s go over a couple of their open-source tools, and try to understand what they do, and if they are going to be useful for you.</p>
<h3 id="heading-openunison">OPENUNISON</h3>
<p>Whether your Kubernetes clusters are running the cloud, on-prem, or in a hybrid mode, OpenUnision is a project that can provide robust authentication and SSO functionalities to your Kubernetes clusters. It also incorporates a zero-trust mode right out of the box, so you don’t have to worry about your cluster keys falling into the wrong hands.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704477274666/c168c36d-f778-4b1d-9a28-0ca4ff186826.png" alt class="image--center mx-auto" /></p>
<p>Image Credits: Tremolo Security Website</p>
<p><a target="_blank" href="https://www.tremolosecurity.com/products/openunison">OpenUnison</a> combines the identity services that are most used by applications into a single system that is quick to deploy, easy to use, and simple to maintain. The identity services provided by OpenUnison include:</p>
<ul>
<li><p><strong>Authentication</strong> - Who are you? How do we know that?</p>
</li>
<li><p><strong>Session Management</strong> - How did you log in? What do you have access to?</p>
</li>
<li><p><strong>Identity Federation</strong> - SSO across domains</p>
</li>
<li><p><strong>User Provisioning</strong> - Creating and managing identity data in systems and applications</p>
</li>
<li><p><strong>Access Request Management</strong> - Why do you have access?</p>
</li>
</ul>
<h3 id="heading-myvirtualdirectory"><strong>MyVirtualDirectory</strong></h3>
<p>A virtual directory is a service (typically provied via LDAP) that allows for the integration of multiple data repositories in a transparent manner to an application. There are several use cases for a virtual directory including (but not limmited to):</p>
<ul>
<li><p>Creating a view of a user with attributes stored in multiple repositories</p>
</li>
<li><p>Formatting user and group object for an application</p>
</li>
<li><p>Creating a larger directory from smaller ones</p>
</li>
</ul>
<p>To learn how a virtual directory can help integrate your applications with your identity data view some virtual directory use cases.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704477315131/79493d32-c1b2-45fa-8965-1b966c77bd11.png" alt class="image--center mx-auto" /></p>
<p>Image Credits: TremoloSecurity GitHub page</p>
<p>Virtual Directories have several use cases. In general a virtual directory is most easily used to help integrate an application into an existing environment. Each of the below usecases is examined in more detail with a description of how <a target="_blank" href="https://www.tremolosecurity.com/products/myvirtualdirectory">MyVirtualDirectory</a> might solve the given problem.</p>
<ul>
<li><p><strong>Namespace Integration</strong> - Integrating multiple directories to form a larger single directory</p>
</li>
<li><p><strong>Delegated Authentication</strong> - Delegating authentication to an enterprise directory while using an edge directory for identity data</p>
</li>
<li><p><strong>Data Transformation</strong> - Transform existing directory data for use by an application</p>
</li>
<li><p><strong>Edge Directory Integration</strong> - Integrate application specific directory data into an enterprise directory without making any changes to the enterprise directory.</p>
</li>
<li><p><strong>Web Services Integration</strong> - Many organizations have web services for the creation and update of user information</p>
</li>
</ul>
<h3 id="heading-conclusion"><strong>Conclusion</strong></h3>
<p>As businesses venture into the realm of cloud-native environments, the complexities of securing access to digital assets have evolved significantly. Traditional security models, anchored in physical fortifications and network perimeters, have given way to dynamic paradigms like Zero Trust Security, Single Sign-On (SSO), Identity and Access Management (IAM), and Role-Based Access Control (RBAC).</p>
<p>In response to these transformations, Tremolo Security has created many tools that act as harmonious solutions, orchestrating self-service identity management and unifying identity data seamlessly. These tools collectively address the challenges posed by the distributed nature of modern networks and Kubernetes environments.</p>
<p>From the granular control of Zero Trust Security to the streamlined user experiences enabled by SSO, IAM's robust access controls, and RBAC's effective permission management, Tremolo Security's suite provides a comprehensive melody for securing cloud-native ecosystems. The benefits span enhanced security postures, improved user experiences, and increased agility for organizations navigating the intricate landscape of digital transformation.</p>
<p>If you're interested in more check out this awesome Twitter Space with <a target="_blank" href="https://twitter.com/mlbiam">Marc</a>, CTO @ <a target="_blank" href="https://twitter.com/tremolosecurity">Tremolo Security</a>, <a target="_blank" href="https://twitter.com/virtualized6ix">Marino</a>, <a target="_blank" href="https://twitter.com/usrbinkat">Kat</a>, and <a target="_blank" href="https://twitter.com/AakanshaPriya_">Aakansha</a>: <a target="_blank" href="https://twitter.com/i/spaces/1yoKMwOEMbWJQ">https://twitter.com/i/spaces/1yoKMwOEMbWJQ</a></p>
<p>And if you want to see some of this in action, check out this video of OpenUnison in action, and feel free to <a target="_blank" href="https://github.com/OpenUnison/openunison-k8s">follow the docs via GitHub</a>!</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/live/wydAXDUhaow?si=8j_dyoMcX6fiBkNm">https://www.youtube.com/live/wydAXDUhaow?si=8j_dyoMcX6fiBkNm</a></div>
<p> </p>
<p>Finally, we look forward to seeing you in the next <a target="_blank" href="https://x.com/AakanshaPriya_/status/1748410537250324947?s=20">Twitter/X-Space on Tuesday @ 10AM ET</a> !!!</p>
<p>Thank you for reading :)!!!</p>
]]></content:encoded></item></channel></rss>