← Back to Baseline

MB-0801

Automated Direct global Admin ACL grants match the approved role policy

MB-C02 Admin & Auth Hardening Medium

In a nonempty bounded deployed authorization_role inventory and complete bounded authorization_rule inventory, every direct allow rule for Magento_Backend::all or Magento_Adminhtml::all assigned to a group role has a role ID in the explicitly configured approved_role_ids policy. Missing policy, malformed/orphan rows, direct user grants or incomplete tables remain UNKNOWN. This checks direct stored grants, not inherited effective privileges or business least privilege.

Overview

In a nonempty bounded deployed authorization_role inventory and complete bounded authorization_rule inventory, every direct allow rule for Magento_Backend::all or Magento_Adminhtml::all assigned to a group role has a role ID in the explicitly configured approved_role_ids policy. Missing policy, malformed/orphan rows, direct user grants or incomplete tables remain UNKNOWN. This checks direct stored grants, not inherited effective privileges or business least privilege.

Why it Matters

A direct global ACL grant can give a role far more power than its ordinary resource list suggests. Comparing it with explicit approved IDs makes that stored exception reviewable.

Inherited privileges and business approval are broader questions than direct group-role grant matching.

Verification Steps

Manual Verification

  1. Read the complete bounded role/rule inventories and the nonempty approved_role_ids policy.
  2. Inspect direct allow grants for Magento_Backend::all or Magento_Adminhtml::all to group roles.
  3. Treat orphan/malformed rows, direct user grants and missing policy as unresolved.

Command / Review Sample

SELECT role_id, resource_id, permission FROM authorization_rule WHERE resource_id IN ('Magento_Backend::all', 'Magento_Adminhtml::all');
# Reconcile group role IDs with explicit approved_role_ids policy.

Use the assessed Magento project and the appropriate application or read-only review account. Replace example hosts, paths and identifiers with the assessment scope; configuration and source fragments are illustrative.

Remediation / Fix Guidance

  1. Compare reported group role IDs with the intended administrator policy in the same deployed database. Remove the unnecessary direct All resource grant or replace it with the specific resources the role needs through Magento Admin role management; do not remove the last required administrative recovery path without testing access.
  2. Maintain approved_role_ids in .magebean/production-checks.json as explicit deployment policy, then re-query real authorization tables through this check. Verify ordinary and restricted Admin functions separately because direct-row policy does not prove effective least privilege.
  3. Rerun MB-0801 against the same release, profile and relevant file/key/package scope; compare the new evidence and inspect any independent collection gaps.

Examples

Illustrative examples only. Interpret them within the current revision criterion above; missing collection evidence is unresolved, never PASS.

Fail Example

A direct global allow grant belongs to a group role outside approved_role_ids.

Pass Example

Every assessed direct global group-role grant matches the supplied approved IDs with complete valid evidence.

Scope and Evidence Limits

Rule revision: 1. Target modes: LOCAL.

In a nonempty bounded deployed authorization_role inventory and complete bounded authorization_rule inventory, every direct allow rule for Magento_Backend::all or Magento_Adminhtml::all assigned to a group role has a role ID in the explicitly configured approved_role_ids policy. Missing policy, malformed/orphan rows, direct user grants or incomplete tables remain UNKNOWN. This checks direct stored grants, not inherited effective privileges or business least privilege.

Reads actual database tables through env.php connection; test PDO injects a real in-memory database, not assertion rows. No default approval list is invented; deployment owner must supply normal versioned policy configuration. Native global-group predicate deliberately does not claim full effective ACL/plugin authorization. Original historical criterion and ID remain in the engineering backlog; this new ID records only its exact supported observation.

Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.

References