dosr
dosr executes commands through RaR policy checks.
Usage
Execute privileged commands with a role-based access control system Usage: dosr [OPTIONS] [COMMAND]... Arguments: [COMMAND]... Command to execute Options: -r, --role <ROLE> Role to select -t, --task <TASK> Task to select (--role required) -u, --user <USER> User to execute the command as -g, --group <GROUP<,GROUP...>> Group(s) to execute the command as -E, --preserve-env Keep environment variables from the current process -D, --chdir <DIR> Change working directory before executing the command -p, --prompt <PROMPT> Prompt to display -K Remove timestamp file -i, --info Print the execution context of a command if allowed by a matching task -h, --help Print help (see more with '--help') -V, --version Print version
If you’re accustomed to utilizing the sudo tool and find it difficult to break that habit, consider creating an alias :
alias sudo="dosr"
alias sr="dosr"
Future Design Considerations
Today, we copied completely the CLI of sudo, thus ensuring old scripts compatibility.
We might following a new design in the future but with retro-compatibility enabled. For example, we could detect when the command name is sudo then using the sudo CLI design, otherwise fallback to a new design.
Examples
dosr reboot
dosr -r ops -t reboot reboot