eigenstate-ipa

Sudo Capabilities

Related docs:

  SUDO PLUGIN     SUDO USE CASES     DOCS MAP  

Purpose

Use this guide to choose the right sudo lookup pattern for your automation.

The plugin reference explains exact option syntax. This page explains when to query a sudo rule, when to query a sudo command or command group, and when a single lookup is enough versus when a broader audit is the better fit.

Contents

Capability Model

flowchart LR
    need["Privileged workflow question"]
    rule["Which sudo rule?\nWho, where, what?"]
    cmd["Which sudo command\nor command group?"]
    audit["Audit or assert"]
    act["Proceed, fail,\nor report drift"]

    need --> rule
    need --> cmd
    rule --> audit
    cmd --> audit
    audit --> act

The sudo lookup has one core split:

1. Pre-flight Before Running Privileged Automation

Use sudo_object='rule' with operation=show when a play depends on a named sudo rule being present and enabled before any privileged workflow starts.

Typical cases:

Why this fits:

2. Validate The Rule Scope Behind A Privileged Workflow

Use sudo_object='rule' when the workflow depends on the correct users, groups, hosts, hostgroups, or RunAs identities being in scope.

Typical cases:

Why this fits:

3. Audit Allowed and Denied Command Surfaces

Use sudo_object='rule' when you need to inspect which command paths and command groups are allowed or denied by a rule.

Typical cases:

Why this fits:

4. Confirm A Shared Command Group Exists

Use sudo_object='commandgroup' when the workflow depends on a named command group being present and containing the expected commands.

Typical cases:

Why this fits:

5. Bulk Audit of Sudo Policy Objects

Use operation=find when you need the full object set for a type.

Typical cases:

Why this fits:

Quick Decision Matrix

Need Query
Check that a privileged workflow rule exists and is enabled sudo_object='rule', operation='show'
Check who or what a rule covers sudo_object='rule', operation='show'
Audit allowed and denied commands on a rule sudo_object='rule', operation='show'
Confirm a concrete command object exists sudo_object='command', operation='show'
Inspect membership of a reusable command set sudo_object='commandgroup', operation='show'
Enumerate all rules, commands, or command groups operation='find' with the appropriate sudo_object