<?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: Meghan Gill</title>
    <description>The latest articles on DEV Community by Meghan Gill (@hi_meghan).</description>
    <link>https://dev.to/hi_meghan</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%2F3383129%2Fb76167c2-2ed2-4db5-b7a8-c67272119ccb.jpg</url>
      <title>DEV Community: Meghan Gill</title>
      <link>https://dev.to/hi_meghan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hi_meghan"/>
    <language>en</language>
    <item>
      <title>Authorization 101: What I Learned from Oso’s “What is Authorization?” Guide</title>
      <dc:creator>Meghan Gill</dc:creator>
      <pubDate>Tue, 26 Aug 2025 01:07:06 +0000</pubDate>
      <link>https://dev.to/hi_meghan/authorization-101-what-i-learned-from-osos-what-is-authorization-guide-5079</link>
      <guid>https://dev.to/hi_meghan/authorization-101-what-i-learned-from-osos-what-is-authorization-guide-5079</guid>
      <description>&lt;p&gt;I recently had the opportunity to review and make some updates to the foundational chapter of &lt;a href="https://www.osohq.com/academy" rel="noopener noreferrer"&gt;Authorization Academy&lt;/a&gt;, Oso’s series of technical guides, entitled &lt;a href="https://www.osohq.com/academy/what-is-authorization" rel="noopener noreferrer"&gt;What is Authorization?&lt;/a&gt; Here’s a brief overview of the key takeaways from this guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Authorization: Who can do what to what?
&lt;/h2&gt;

&lt;p&gt;At its core, authorization defines permissions—determining what actions a user or agent may perform on particular resources in your application. &lt;/p&gt;

&lt;h2&gt;
  
  
  2. Authentication vs. Authorization
&lt;/h2&gt;

&lt;p&gt;These are often bundled under "auth," but they serve distinct roles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authentication&lt;/strong&gt; confirms identity. Using a physical world analogy, authentication is like getting into the front door of a house.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authorization&lt;/strong&gt; decides what you can do once you have been 
authenticated. Continuing on the analogy above, it determines which rooms in the house you can access once you’re in the front door.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Multiple Enforcement Layers
&lt;/h2&gt;

&lt;p&gt;Authorization checks can occur at various points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initial connection or request middleware&lt;/li&gt;
&lt;li&gt;Web server or router level&lt;/li&gt;
&lt;li&gt;Business logic layer within the application&lt;/li&gt;
&lt;li&gt;Database or data-access layer itself&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Authorization Academy chapter details each of these approaches. &lt;/p&gt;

&lt;h2&gt;
  
  
  3. How to think about the authorization model
&lt;/h2&gt;

&lt;p&gt;In exploring the different enforcement layers, we use the following framework:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Actor&lt;/strong&gt; - &lt;em&gt;Who&lt;/em&gt; is making the request&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Actions&lt;/strong&gt; - &lt;em&gt;What&lt;/em&gt; are they trying to do&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resources&lt;/strong&gt; - What are they doing &lt;em&gt;it to&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Later chapters explore common access patterns such as &lt;a href="https://www.osohq.com/academy/role-based-access-control-rbac" rel="noopener noreferrer"&gt;role based access control (RBAC)&lt;/a&gt; and &lt;a href="https://www.osohq.com/academy/relationship-based-access-control-rebac" rel="noopener noreferrer"&gt;relationship based access control (ReBAC)&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Authorization’s Three Pillars
&lt;/h2&gt;

&lt;p&gt;A robust permissions system separates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data&lt;/strong&gt;: the resource being accessed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logic&lt;/strong&gt;: the rules defining permissions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforcement&lt;/strong&gt;: where decisions are applied&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Permissions decisions can be implemented in-app, via centralized services, or using a hybrid architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Architecture
&lt;/h2&gt;

&lt;p&gt;Authorization tends to be invisible to end-users but is foundational for secure applications. Recognizing common authorization patterns—such as centralizing enforcement or maintaining policy separation—makes the logic easier to manage and reason about.&lt;/p&gt;

&lt;p&gt;I’m looking forward to working on updating the next chapter, and plan to summarize it here!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>RBAC Models Explained</title>
      <dc:creator>Meghan Gill</dc:creator>
      <pubDate>Sat, 02 Aug 2025 13:36:52 +0000</pubDate>
      <link>https://dev.to/hi_meghan/rbac-models-explained-4c7i</link>
      <guid>https://dev.to/hi_meghan/rbac-models-explained-4c7i</guid>
      <description>&lt;p&gt;Managing &lt;em&gt;who&lt;/em&gt; can do &lt;em&gt;what&lt;/em&gt; in an application is a fundamental challenge for developers. As your app becomes more complex and your user base grows, manually assigning permissions to every user becomes unmanageable and error-prone. &lt;a href="https://www.osohq.com/academy/role-based-access-control-rbac" rel="noopener noreferrer"&gt;Role-Based Access Control (RBAC)&lt;/a&gt; solves this by grouping permissions into roles and assigning roles to users. &lt;/p&gt;

&lt;p&gt;RBAC is one of the most widely used access control models. It enforces the principle of least privilege, simplifies admin tasks, and improves auditability. &lt;/p&gt;

&lt;p&gt;But "RBAC" isn't a single, monolithic concept. It's a spectrum of models, each suited for different needs. Choosing the right one is critical for building a secure and scalable application.&lt;/p&gt;

&lt;p&gt;What we'll cover&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RBAC Foundations:&lt;/strong&gt; Core concepts and structure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hierarchical RBAC:&lt;/strong&gt; Role inheritance and org charts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource-Specific Roles:&lt;/strong&gt; Per-resource roles for granular control&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choosing the Right Model:&lt;/strong&gt; When to use which&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RBAC Alternatives:&lt;/strong&gt; ReBAC, ABAC and beyond&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  RBAC Foundations
&lt;/h1&gt;

&lt;p&gt;Every RBAC system has three core components: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Users:&lt;/strong&gt; The individuals using your app (e.g., &lt;code&gt;Alice&lt;/code&gt;, &lt;code&gt;Bob&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Roles:&lt;/strong&gt; Job functions or titles that group permissions (e.g., &lt;code&gt;editor&lt;/code&gt;, &lt;code&gt;viewer&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permissions:&lt;/strong&gt; Actions roles can perform (e.g., &lt;code&gt;read_document&lt;/code&gt;, &lt;code&gt;edit_document&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this model, you define a set of roles and the permissions associated with each. Then, you simply assign one or more roles to each user. For example, in a content management system, you might have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;writer&lt;/code&gt; role with &lt;code&gt;create_post&lt;/code&gt; and &lt;code&gt;edit_own_post&lt;/code&gt; permissions.&lt;/li&gt;
&lt;li&gt;An &lt;code&gt;editor&lt;/code&gt; role with &lt;code&gt;edit_any_post&lt;/code&gt; and &lt;code&gt;publish_post&lt;/code&gt; permissions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you assign the &lt;code&gt;writer&lt;/code&gt; role to Alice, she can create new posts and edit the ones she created, but she can't publish them or edit Bob's posts. This is simple, predictable, and easier to manage than assigning individual permissions to Alice directly.&lt;/p&gt;

&lt;h1&gt;
  
  
  Hierarchical RBAC: Mirroring Your Org Chart
&lt;/h1&gt;

&lt;p&gt;RBAC as described above works well for simple structures, but what happens when your organization has a clear chain of command? You wouldn't want to manually assign a manager all the same permissions as their direct reports, plus their own. That's where Hierarchical RBAC comes in.&lt;/p&gt;

&lt;p&gt;Hierarchical RBAC introduces the concept of role inheritance. It allows you to create a hierarchy where senior roles automatically inherit all the permissions of their subordinate roles.&lt;/p&gt;

&lt;p&gt;For instance, you could structure your roles like this: &lt;code&gt;Admin&lt;/code&gt; → &lt;code&gt;Editor&lt;/code&gt; → &lt;code&gt;Writer&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;Writer&lt;/code&gt; role has base-level permissions to create and edit their own content.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Editor&lt;/code&gt; role inherits all &lt;code&gt;Writer&lt;/code&gt; permissions and adds the ability to edit any content and publish it.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Admin&lt;/code&gt; role inherits all &lt;code&gt;Editor&lt;/code&gt; permissions (and by extension, &lt;code&gt;Writer&lt;/code&gt; permissions) and adds user management capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This model is efficient for organizations with well-defined structures. It reduces redundant configuration and ensures that access levels naturally align with organizational responsibility. When a new permission is added to the &lt;code&gt;Writer&lt;/code&gt; role, &lt;code&gt;Editors&lt;/code&gt; and &lt;code&gt;Admins&lt;/code&gt; get it automatically, without any extra work.&lt;/p&gt;

&lt;h1&gt;
  
  
  Beyond the Basics: Resource-Specific
&lt;/h1&gt;

&lt;p&gt;So far we have discussed organizational roles. A user is an &lt;code&gt;editor&lt;/code&gt; or an &lt;code&gt;admin&lt;/code&gt; across the entire application. But modern applications, especially collaborative SaaS products, often require more granular control.&lt;/p&gt;

&lt;p&gt;What if a user is an &lt;code&gt;admin&lt;/code&gt; for one project but only a &lt;code&gt;viewer&lt;/code&gt; for another? This is where Resource-Specific Roles come into play.&lt;br&gt;
In this model, a role is not just assigned to a user; it's a relationship between a user and a specific resource. For example, in platforms like Google Docs or GitHub, you don't have a single "editor" role for the entire platform. Instead, you are granted the &lt;code&gt;editor&lt;/code&gt; role on a specific document or the &lt;code&gt;maintainer&lt;/code&gt; role on a specific repository.&lt;/p&gt;

&lt;p&gt;This is a powerful and flexible model, but it also introduces complexity that can be challenging to build and manage from scratch. The number of relationships between users, roles, and resources can increase significantly, making it difficult to reason about your authorization logic.&lt;/p&gt;

&lt;p&gt;This is where an &lt;a href="https://www.osohq.com/cloud/authorization-service" rel="noopener noreferrer"&gt;authorization service&lt;/a&gt; like &lt;a href="https://www.osohq.com/" rel="noopener noreferrer"&gt;Oso&lt;/a&gt; becomes valuable. Oso is designed to handle these complex, fine-grained models. Its declarative policy language, &lt;a href="https://www.osohq.com/post/polar-declarative-language-authorization" rel="noopener noreferrer"&gt;Polar&lt;/a&gt;, allows you to define these relationships naturally.&lt;br&gt;
For example, here’s how you could define a resource-specific role in an Oso policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;actor User { }

resource Organization {
  roles = ["admin", "member"];
  permissions = [
    "read", "add_member", "repository.create",
    "repository.read", "repository.delete"
  ];

  # role hierarchy:
  # admins inherit all member permissions
  "member" if "admin";

  # org-level permissions
  "read" if "member";
  "add_member" if "admin";
  # permission to create a repository
  # in the organization
  "repository.create" if "admin";

  # permissions on child resources
  "repository.read" if "member";
  "repository.delete" if "admin";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This policy defines an authorization model where a &lt;code&gt;User&lt;/code&gt; can have roles within an &lt;code&gt;organization&lt;/code&gt;, such as "admin" or "member", with a role hierarchy granting admins all member permissions. It specifies both organization-level and child resource permissions (like for repositories), determining what actions each role can perform. Oso's engine evaluates these rules efficiently, returning authorization decisions in under &lt;a href="https://www.osohq.com/post/new-standard-for-enterprise-permission-control" rel="noopener noreferrer"&gt;10ms&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Choosing and Implementing the Right Model
&lt;/h1&gt;

&lt;p&gt;So, which RBAC model is right for you? The answer depends entirely on your application's needs.&lt;/p&gt;

&lt;p&gt;Here’s a quick guide to help you decide:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Key Feature&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Foundational RBAC&lt;/td&gt;
&lt;td&gt;Simple role-to-permission mapping&lt;/td&gt;
&lt;td&gt;Small applications, internal tools, or systems with a few, well-defined user types.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hierarchical RBAC&lt;/td&gt;
&lt;td&gt;Roles inherit permissions from others&lt;/td&gt;
&lt;td&gt;Applications for organizations with clear reporting lines or structures.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resource-Specific RBAC&lt;/td&gt;
&lt;td&gt;Roles are tied to specific resources&lt;/td&gt;
&lt;td&gt;Collaborative SaaS, multi-tenant applications, and platforms with user-generated content.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  RBAC Alternatives
&lt;/h1&gt;

&lt;p&gt;RBAC works for many apps—but it doesn’t scale indefinitely. Most teams eventually hit one of these problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Role explosion:&lt;/strong&gt; You create new roles to satisfy each scenario, making it difficult to manage and complex to audit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Over-permissioning:&lt;/strong&gt; To avoid role explosion, you consolidate permissions into fewer roles, accepting the risk that some users may be over-permissioned.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At that point, other models may be a better fit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.osohq.com/academy/relationship-based-access-control-rebac" rel="noopener noreferrer"&gt;Relationship Based Access Control (ReBAC)&lt;/a&gt;&lt;/strong&gt; - organizing permissions based on relationships between resources, such as a user can edit a task if they are a collaborator on the project the task belongs to &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.osohq.com/learn/what-is-attribute-based-access-control-abac" rel="noopener noreferrer"&gt;Attribute Based Access Control (ABAC)&lt;/a&gt;&lt;/strong&gt; - a superset of RBAC and ReBAC, the ABAC model organizes permissions based on user, resource, or context attributes. An example might be a finance manager can only access a report during business hours from their company laptop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To learn more about these models, I recommend that you check out &lt;strong&gt;&lt;a href="https://www.osohq.com/academy" rel="noopener noreferrer"&gt;Authorization Academy&lt;/a&gt;&lt;/strong&gt;. It’s a series of technical, vendor-agnostic guides on application authorization. There is also a great comparison of &lt;strong&gt;&lt;a href="https://www.osohq.com/learn/rbac-vs-abac" rel="noopener noreferrer"&gt;RBAC vs ABAC&lt;/a&gt;&lt;/strong&gt; available on the Oso website with examples.&lt;/p&gt;

</description>
      <category>permissions</category>
      <category>security</category>
    </item>
  </channel>
</rss>
