<?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>Forem: Akshay Sobti</title>
    <description>The latest articles on Forem by Akshay Sobti (@akshay_sobti_15).</description>
    <link>https://forem.com/akshay_sobti_15</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%2F3676421%2F71af9987-9189-4d5c-a352-bc8b9836f581.png</url>
      <title>Forem: Akshay Sobti</title>
      <link>https://forem.com/akshay_sobti_15</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/akshay_sobti_15"/>
    <language>en</language>
    <item>
      <title>Role Based Access Control in Microsoft Azure</title>
      <dc:creator>Akshay Sobti</dc:creator>
      <pubDate>Wed, 24 Dec 2025 07:58:13 +0000</pubDate>
      <link>https://forem.com/akshay_sobti_15/role-based-access-control-in-microsoft-azure-1n1c</link>
      <guid>https://forem.com/akshay_sobti_15/role-based-access-control-in-microsoft-azure-1n1c</guid>
      <description>&lt;p&gt;Azure role-based access control is an access management system built over Azure Resource Manager which provides fine-grained access to specific users over specific resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Role Assignment&lt;/strong&gt;&lt;br&gt;
Role assignment allows us to grant specific users access to specific resources at specific levels. This forms the backbone of Azure Role-Based Access Control or Azure RBAC.&lt;/p&gt;

&lt;p&gt;RBAC is required because it is like controlling access to the resources under your jurisdiction to make sure the relevant people are able to access the required resources.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Role Assignment = Role definition + Security Principal + Scope

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Role Definition or Azure Roles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Role definition (referring to an Azure role) is a group of actions that can be performed by a particular entity. They are nothing but a set of permissions required to deal with the resources present on the Azure portal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Principal:&lt;/strong&gt;&lt;br&gt;
The service principal will use the resources. Azure gives two options when creating a role assignment – User, Group, or service principal and Managed Identity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt;&lt;br&gt;
The resource to which the security principal is given access. It can be either the management group, the subscription, the resource group, resource.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to Create a Role Assignment&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt; Let’s say you have a resource group called demorg and want to give someone named John Green the contributor role.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scope:– Resource Group (demorg)&lt;/li&gt;
&lt;li&gt;Role Definition:– Contributor&lt;/li&gt;
&lt;li&gt;Service Principal:– John Green&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Go to the left sidebar and click on Access Control (IAM) &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68mweftjpneo2bpxg9xr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68mweftjpneo2bpxg9xr.png" alt=" " width="340" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Click on Add to add a role assignment&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ediwx710g8g0f3un9vz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ediwx710g8g0f3un9vz.png" alt=" " width="695" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Choose the role definition:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Press Next and select the member to whom you want to assign the role by clicking + Select Members:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabjehgt4h0w4gjbalenn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabjehgt4h0w4gjbalenn.png" alt=" " width="622" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Click Next and finally click on the Review and Assign button.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Once, the role assignment is complete, you can navigate to the resource group and again click the access control option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Click on the role assignments tab and search for the username in the search bar. Their required role should be present there with their name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flevam0tarj2m4ylmehxi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flevam0tarj2m4ylmehxi.png" alt=" " width="696" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Share your experience or questions in the comments, let’s learn from each other.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>azure</category>
      <category>learning</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>Constructor In Multiple Inheritance in C++</title>
      <dc:creator>Akshay Sobti</dc:creator>
      <pubDate>Wed, 24 Dec 2025 07:43:28 +0000</pubDate>
      <link>https://forem.com/akshay_sobti_15/constructor-in-multiple-inheritance-in-c-10oh</link>
      <guid>https://forem.com/akshay_sobti_15/constructor-in-multiple-inheritance-in-c-10oh</guid>
      <description>&lt;p&gt;Constructor is a class member function with the same name as the class. The main job of the constructor is to allocate memory for class objects. Constructor is automatically called when the object is created. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiple Inheritance:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multiple Inheritance is a feature of C++ where a class can derive from several(two or more) base classes. The constructors of inherited classes are called in the same order in which they are inherited.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1od17b7mxv9fjrfismnz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1od17b7mxv9fjrfismnz.png" alt=" " width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3y3n6uunirfqob03q0pn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3y3n6uunirfqob03q0pn.png" alt=" " width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Syntax of Multiple Inheritance:&lt;/p&gt;

&lt;p&gt;class S: public A1, virtual A2&lt;br&gt;
{&lt;br&gt;
....&lt;br&gt;
};                                                                                            &lt;/p&gt;

&lt;p&gt;Here,&lt;br&gt;
A2(): virtual base constructor&lt;br&gt;
A1(): base constructor&lt;br&gt;
S(): derived constructor&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt; Below is the C++ program to show the concept of Constructor in Multiple Inheritance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// C++ program to implement
// constructor in multiple 
// inheritance
#include&amp;lt;iostream&amp;gt;
using namespace std;
class A1
{
  public:
  A1()
  {
    cout &amp;lt;&amp;lt; "Constructor of the base class A1 \n";
  }
​
};
​
class A2
{
  public:
  A2()
  {
    cout &amp;lt;&amp;lt; "Constructor of the base class A2 \n";
  }
​
};
​
class S: public A1, virtual A2
{
  public:
  S(): A1(), A2()
  {
    cout &amp;lt;&amp;lt; "Constructor of the derived class S \n";
  }
};
​
// Driver code
int main()
{
  S obj;
  return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
Constructor of the base class A2 &lt;br&gt;
Constructor of the base class A1 &lt;br&gt;
Constructor of the derived class S &lt;br&gt;
Time complexity: O(1)&lt;br&gt;
Auxiliary Space: O(1)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt; Below is the C++ program to show the concept of Constructor in Multiple Inheritance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// C++ program to implement
// constructors in multiple
// inheritance
#include&amp;lt;iostream&amp;gt;
using namespace std;
class A1
{
    public:
        A1()
        {
            int a = 20, b = 35, c;
            c = a + b;
            cout &amp;lt;&amp;lt; "Sum is:" &amp;lt;&amp;lt; 
                     c &amp;lt;&amp;lt; endl;
        }
};
​
class A2
{
    public:
        A2()
        {
            int x = 50, y = 42, z;
            z = x - y;
            cout &amp;lt;&amp;lt; "Difference is:" &amp;lt;&amp;lt; 
                     z &amp;lt;&amp;lt; endl;
        }
};
​
class S: public A1,virtual A2
{
    public:
        S(): A1(), A2()
        {
            int r = 40, s = 8, t;
            t = r * s;
            cout &amp;lt;&amp;lt; "Product is:" &amp;lt;&amp;lt; 
                     t &amp;lt;&amp;lt; endl;
        }
};
​
// Driver code
int main()
{
    S obj;
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
Difference is:8&lt;br&gt;
Sum is:55&lt;br&gt;
Product is:320&lt;br&gt;
Time complexity: O(1)&lt;br&gt;
Auxiliary Space: O(1)&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>cpp</category>
    </item>
  </channel>
</rss>
