Rethinking Access with Task-Based and Role-Aware Security
Task by task: unlock secure access without the overload.
Glenn Atter
Fractional CTO
1. Introduction
Access control is a balancing act. Assigning permissions directly to users or broad job titles often gives people more access than they need, increasing risk and complicating audit. Traditional RBAC can work in simple environments, but it struggles when teams, systems, and cloud resources change frequently.
A task-based model aligns permissions with what people and systems actually do. It uses four layers: baseline permissions, task-based security groups, role-to-task mapping, and just-in-time access through Privileged Identity Management.
| Model | Strengths | Weaknesses |
|---|---|---|
| RBAC | Simple, easy to administer, aligned to job functions. | Static, prone to over-privileging, weak on context. |
| ABAC | Flexible, context-aware, fine-grained. | Complex to implement and operate. |
| PBAC | Centralised policies and scalable governance. | Can become abstract and hard to integrate. |
| Task-based | Granular, auditable, workflow-specific, and JIT-friendly. | Needs workflow analysis and ongoing maintenance. |
2. The problem with broad roles
Broad roles are attractive because they are easy to understand. The problem is that roles such as Developer, Support, Operations, or Administrator rarely describe the actual task a person needs to perform. Over time, exceptions accumulate, permissions expand, and the organisation loses the ability to explain why someone has access.
3. Security model
3.1 Baseline permissions
Baseline permissions are the smallest reusable units of access needed to perform a specific operation. They are not assigned directly to users. They act as building blocks for tasks, making permissions easier to reason about and audit.
In Azure, role-assignable groups fit this layer well because Azure roles can be assigned to them. Normal security groups can then combine those baseline groups into higher-level tasks. Kubernetes can follow the same pattern by mapping groups to namespace roles with role bindings.
- Baseline permissions simplify related technical access into logical units.
- They can be reused across tasks, environments, and systems.
- They provide clean documentation for compliance reviews.
3.2 Task-based security groups
Task-based groups combine baseline permissions to represent a complete technical task, such as deploying an application, managing secrets, or reviewing logs. The group should reflect how work is actually done and include no unnecessary permissions.
| Principle | Meaning |
|---|---|
| Focused access | Only include permissions needed for the task. |
| Separation of duties | Avoid overlap so access boundaries stay clear. |
| Scalability | Reuse task groups for onboarding and access review. |
| Holistic scope | Include identity-based and network-based permissions where needed. |
3.3 Role-to-task mapping
Roles represent business responsibilities, while tasks represent technical access. A developer role should map to the tasks needed for daily work, but never directly to baseline permissions. This keeps access traceable and prevents broad role sprawl.
New tasks can be added to roles without restructuring the model. Audit also becomes simpler because you can show who can perform which task and why.
3.4 Just-in-time access with PIM
Some tasks, such as production secret management or critical infrastructure changes, should not be permanently assigned. PIM provides temporary access with justification, approval, time limits, and a full audit trail.
- Users request a task group and provide a reason or change request ID.
- A peer or manager approves the request; users should not approve their own access.
- Access is time-bound and automatically revoked.
- MFA and Conditional Access can be required at activation time.
3.5 CI/CD pipelines
Pipelines are often granted broad permissions for simplicity. They should be treated as first-class identities with scoped task access. For example, a production deployment pipeline might receive only the task group needed to update container images and deploy to a Kubernetes namespace.
4. Exceptions and highly privileged roles
There will always be tasks that were not identified in the original model. Create higher permission task groups for those cases, manage them through PIM, require senior approval, and flag them for later review. The review decides whether a new task should be created.
Highly privileged roles such as Global Administrator can use the same model, but PIM introduces a dependency on Entra ID, MFA, Conditional Access, and network availability. Break-glass accounts are therefore essential. Microsoft recommends at least two emergency access accounts that are excluded from PIM, MFA, and Conditional Access, monitored closely, and rotated regularly.
5. Audit
The model works when common tasks are assigned by default and uncommon tasks use PIM. Track how often PIM is used; frequent activation shows drift between intended and effective permissions and may indicate that the task model needs refinement.
Review all roles and tasks at least quarterly, and review high-risk roles and PIM activations monthly.
6. Examples
Baseline permission names should separate environment, service, scope, and action. A useful convention is BASE_ENV_SERVICE_SCOPE_ACTION.
| Example | Meaning |
|---|---|
| BASE_PROD_KV_SECRETS_READLIST | List production Key Vault secrets without reading the values. |
| BASE_PROD_KV_SECRETS_GET | List and read production Key Vault secret values. |
| BASE_PROD_KV_SECRETS_ADMIN | Create or update production Key Vault secrets. |
| BASE_PROD_K8S_NS_A_VIEWER | Read workloads in a specific Kubernetes namespace. |
| BASE_PROD_ACR_IMAGE_PUSH | Push updated container images to the production registry. |
| BASE_PROD_VPN_ACCESS | Assign VPN access to a restricted production address pool. |
Tasks then combine baselines. For example, TASK_PROD_KEYVAULT_ADMIN might combine production VPN access with production Key Vault secret administration. TASK_PROD_VIEWER might combine registry, Kubernetes, monitoring, and Application Insights read access. TASK_PROD_NS_A_DEPLOYMENT might combine registry image push with namespace deployment permissions.
Roles then map to tasks. A developer may have standing development viewer access and PIM access to production viewer or development deployment tasks. A senior developer may inherit that role and gain PIM access to production deployment and production Key Vault administration. A CI production deployment role can be assigned to a managed identity or service principal, giving a pipeline exactly enough access to deploy.
7. Summary
Task-based, role-aware security builds access from the ground up. Baseline permissions describe the smallest technical actions, tasks describe real workflows, roles map people to those tasks, and PIM handles sensitive or infrequent elevation.
The benefits are least privilege, modular scaling, better developer velocity, cleaner audit, and automation-ready governance. The drawbacks are real too: initial setup takes analysis, definitions must be maintained, tooling needs to support fine-grained access, and teams may need help moving away from broad roles.
8. Final thoughts
I developed this model during a growth phase at a startup while planning a new production environment. The design was shaped by onboarding and offboarding policy, ISO 27001 audit needs, and the release of Azure PIM.
The key design decision was to view operations through the lens of tasks. Routine tasks used permanent assignments. Infrequent tasks used time-bound elevation. Higher-level administrative options existed for edge cases, but they required documentation and review.
That upfront planning paid off through a stronger security posture, efficient operations, and transparent audit trails.
Keep reading
Related posts
Data Protection
2025-11-26
Data protection does not have to be scary. Strip it back to What, Where, Why, and How, then build a simple, audit-ready system that works for real companies.
VMs vs. Containers: Navigating Real-World Security Trade-Offs
2025-11-25
Unlocking secure deployments: from robust isolation to agile recovery in a dynamic threat landscape.
Dev Box Pools
2025-11-24
Effortlessly secure, scalable, and customisable CI/CD agents for Azure DevOps.