Role-Aware Language Models for Secure and Contextualized Access Control in Organizations
Saeed Almheiri, Yerulan Kongrat, Adrian Santosh, Ruslan Tasmukhanov, Josemaria Loza Vera, Muhammad Dehan Al Kautsar, Fajri Koto
TL;DR
This work tackles the problem of enforcing enterprise access control in LLMs by introducing role-aware behavior. It proposes three modeling strategies—BERT-based role classifiers, LLM-based role classifiers, and role-conditioned generation—and evaluates them on two data streams (repurposed instruction data and synthetic organization data) representing hierarchical permissions. The study shows that instruction-tuned LLM classifiers achieve the strongest balance of high access-control accuracy (up to ~90%) and robust behavior across organizational structures, while generation-based approaches offer trade-offs between strictness and flexibility. It also provides a thorough analysis of jailbreak resilience, blacklist handling, and encoding choices, identifying directions for future work in dynamic role updates and integration with external knowledge sources. Overall, the results demonstrate the practicality of role-aware LLMs for secure, context-driven access control in organizations and outline concrete avenues to enhance generalization and safety in real-world deployments.
Abstract
As large language models (LLMs) are increasingly deployed in enterprise settings, controlling model behavior based on user roles becomes an essential requirement. Existing safety methods typically assume uniform access and focus on preventing harmful or toxic outputs, without addressing role-specific access constraints. In this work, we investigate whether LLMs can be fine-tuned to generate responses that reflect the access privileges associated with different organizational roles. We explore three modeling strategies: a BERT-based classifier, an LLM-based classifier, and role-conditioned generation. To evaluate these approaches, we construct two complementary datasets. The first is adapted from existing instruction-tuning corpora through clustering and role labeling, while the second is synthetically generated to reflect realistic, role-sensitive enterprise scenarios. We assess model performance across varying organizational structures and analyze robustness to prompt injection, role mismatch, and jailbreak attempts.
