<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chethan K</title>
    <description>The latest articles on DEV Community by Chethan K (@chethankumblekar).</description>
    <link>https://dev.to/chethankumblekar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1503238%2Fc33ce9e3-761a-49d6-b9e6-9e0f2be966d0.jpg</url>
      <title>DEV Community: Chethan K</title>
      <link>https://dev.to/chethankumblekar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chethankumblekar"/>
    <language>en</language>
    <item>
      <title>Open Authorization 2.0 (OAuth2.0) - Authorization Code Grant</title>
      <dc:creator>Chethan K</dc:creator>
      <pubDate>Thu, 18 Jul 2024 14:00:27 +0000</pubDate>
      <link>https://dev.to/chethankumblekar/open-authorization-20-oauth20-authorization-code-grant-42p0</link>
      <guid>https://dev.to/chethankumblekar/open-authorization-20-oauth20-authorization-code-grant-42p0</guid>
      <description>&lt;p&gt;Let's Consider there is an image generator-based application that generates images based on text input and finally it should be saved in some storage provider &lt;em&gt;ex&lt;/em&gt; &lt;em&gt;Google Drive&lt;/em&gt;. but the image generator application can't access the drive to store the image, it's not safe to provide a username and password to any third-party applications like the one above. OAuth 2.0 helps in solving the above problem.&lt;/p&gt;

&lt;p&gt;Open Authorization 2.0  is the authorization framework that enables third-party applications to obtain limited access to an HTTP Service.&lt;br&gt;
it may be on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its behalf.&lt;/p&gt;

&lt;p&gt;Grant types in OAuth 2.0&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authorization Code Grant&lt;/li&gt;
&lt;li&gt;Client Credentials Grant&lt;/li&gt;
&lt;li&gt;Implicit Grant&lt;/li&gt;
&lt;li&gt;Resource Owner Password Grant&lt;/li&gt;
&lt;li&gt;Device Authorization Grant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, we will discuss the most famous Grant type Authorization code Grant flow&lt;/p&gt;

&lt;p&gt;taking the above example will explain each step involved in the Authorization code grant type&lt;/p&gt;

&lt;p&gt;First of all, for third-party (Client) applications to make use of OAuth, they need to be registered with the Authorization Server and get the client ID and secret. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;First, the user (Resource Owner) accesses the third-party application (Client) in our example its image generator, which will generate images based on his input. now he wants to save it to some storage say Google Storage.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgi35d3uk30676g6p5xwm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgi35d3uk30676g6p5xwm.png" alt="Image description" width="800" height="159"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;now the application redirects in the browser with the client ID, redirect URI, response types &lt;em&gt;ex&lt;/em&gt; &lt;em&gt;code&lt;/em&gt;, and scopes.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm68694xy12n2t1n84w52.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm68694xy12n2t1n84w52.png" alt="Image description" width="800" height="162"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;once the authorization server/resource server gets the request authorization server will prompt for user login if there is no active session for logging in to the authorization resource/server in our case, the Google Authorization Server.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famceznwx5i9bvkbq6q5l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famceznwx5i9bvkbq6q5l.png" alt="Image description" width="800" height="147"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;once the user logs in, the authorization server presents a consent form based on scopes requested by the client, for example writing blob to storage, reading blobs, etc.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwd5ysvgb4wqrf1s9k0xd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwd5ysvgb4wqrf1s9k0xd.png" alt="Image description" width="800" height="140"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;once the scopes are granted by the resource owner, the authorization server will redirect back to the client using the redirect uri sent by the client during the initial request with the authorization code.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuoe8zezxahw19i985zcx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuoe8zezxahw19i985zcx.png" alt="Image description" width="800" height="149"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;once the client gets the authorization code it sends the client ID and secret along with the authorization code.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famxgcpyj87di0q2mhhyp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Famxgcpyj87di0q2mhhyp.png" alt="Image description" width="800" height="137"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;once the authorization server gets client credentials along with the authorization code it responds with the access token.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbizbz84oz2qfsoqx450g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbizbz84oz2qfsoqx450g.png" alt="Image description" width="800" height="154"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;now the client will use that access token with limited privileges based on scopes It is able to access resources/execute a particular task, in our case saving the image as a blob to Google storage/Drive using google API.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>authenication</category>
      <category>openidconnect</category>
      <category>oauth2</category>
    </item>
    <item>
      <title>Multitenant Considerations In Azure</title>
      <dc:creator>Chethan K</dc:creator>
      <pubDate>Thu, 06 Jun 2024 19:37:04 +0000</pubDate>
      <link>https://dev.to/chethankumblekar/multitenant-considerations-in-azure-bbn</link>
      <guid>https://dev.to/chethankumblekar/multitenant-considerations-in-azure-bbn</guid>
      <description>&lt;h3&gt;
  
  
  What is Multitenancy?
&lt;/h3&gt;

&lt;p&gt;A multitenant solution serves multiple distint customers or tenants and they might be individual organizations or group of users.&lt;em&gt;Examples include B2B solutions (like accounting software), B2C solutions (such as music streaming), and enterprise-wide platforms (like shared Kubernetes clusters).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;a multitenant solution is mostly considered by those who building SaaS products.who mainly targeted for business or consumers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design Considerations for Multitenant Solution
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Tenant Isolation
&lt;/h4&gt;

&lt;p&gt;One of the biggest considerations in the design of a multitenant architecture is the level of isolation that each tenant needs. Isolation can mean different things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Having a single shared infrastructure, with separate instances of your application and separate databases for each tenant.&lt;/li&gt;
&lt;li&gt;Sharing some common resources, but keeping other resources separate for each tenant.&lt;/li&gt;
&lt;li&gt;Keeping data on a separate physical infrastructure. In the cloud, this configuration might require separate Azure resources for each tenant. It could even mean deploying a separate physical infrastructure by using dedicated hosts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkws2vgv6xuda2rco952.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkws2vgv6xuda2rco952.png" alt="Image description" width="593" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Tenancy Models
&lt;/h4&gt;

&lt;h5&gt;
  
  
  1. Automated single-tenant deployments
&lt;/h5&gt;

&lt;p&gt;In an automated single-tenant deployment model, you deploy a dedicated set of infrastructure for each tenant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb4n7oqlujm3unjei50r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb4n7oqlujm3unjei50r.png" alt="Image description" width="509" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;people who use this model use infrastructure as code (IaC) for repeating the infra creation and deployment for all customers and hence automate it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A key benefit of this approach is that data for each tenant is isolated, which reduces the risk of accidental leakage. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;cost efficiency is low, because you don't share infrastructure among your tenants. If a single tenant requires a certain infrastructure cost, 100 tenants probably require 100 times that cost. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  2. Fully multitenant deployments
&lt;/h5&gt;

&lt;p&gt;In this approach unlike single-tenant deployment here all components are shared. we will have only once set of infrastructure to deploy and maintain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6fg4mlhy9fia2edk1di.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6fg4mlhy9fia2edk1di.png" alt="Image description" width="508" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;operating this model is less expensive as components are shared accross tenants.even if we want to deploy with higher tiers or SKUs of resources still the overal deployment cost is lower the cost of single-tenant resources.&lt;/li&gt;
&lt;li&gt;Might have risk of memory leaks and down time affects all the tenants&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  3. Automated single-tenant deployments
&lt;/h5&gt;

&lt;p&gt;This approach has combination of single-tenant and multitenant deployments. For example, you might have most of your customers' data and application tiers on multitenant infrastructures, but deploy single-tenant infrastructures for customers who require higher performance or data isolation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy multiple instances of your solution geographically, and map each tenant to a specific deployment. This approach is particularly effective when you have tenants in different geographies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flyn42l89b7t45kb00yed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flyn42l89b7t45kb00yed.png" alt="Image description" width="507" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Since you're still sharing infrastructure, you can gain some of the cost benefits of using shared multitenant deployments. 
But codebase will probably need to be designed to support both multitenant and single-tenant deployments. &lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  4. Horizontally partitioned deployments
&lt;/h5&gt;

&lt;p&gt;In a horizontal deployment, you have some shared components but maintain other components with single-tenant deployments. For example, you could build a single application tier and then deploy individual databases for each tenant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F32p58gt7u9d6rmdszjn9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F32p58gt7u9d6rmdszjn9.png" alt="Image description" width="508" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Horizontally partitioned deployments can help you mitigate a noisy neighbor problem, if you identify that most of the load on your system is caused by specific components that you can deploy separately for each tenant. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;With a horizontally partitioned deployment, you still need to consider the automated deployment and management of your components, especially the components used by a single tenant.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ref-&lt;a href="https://learn.microsoft.com/en-us/azure/architecture/guide/multitenant/approaches/overview" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/azure/architecture/guide/multitenant/approaches/overview&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>multitenancy</category>
      <category>azure</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
