Skip to content
Twentyfirst UIPro

Command Whitelist

Data · CommandWhitelist

View as Markdown

The commands an agent may run, per server: the template with its {parameters} marked, what each parameter accepts (fixed values or a pattern), the risk (read only, changes, critical) and whether it needs an approval (by default everything that is not read only). blocked lists patterns refused on every server; actions(command, server) adds row controls. On phones the risk and approval move under the command.

web-1deploy@203.0.113.7
  • systemctl status {service}Read a service's state
    {service}
    nginx | shop | worker
    Read onlyRuns without approval
  • journalctl -u {service} -n {lines}
    {service}
    nginx | shop
    {lines}
    1–500
    Read onlyRuns without approval
  • systemctl restart {service}Restarts the service; requests in flight fail
    {service}
    nginx | shop
    CriticalNeeds approval
  • /srv/shop/deploy.sh {commit}
    {commit}
    [0-9a-f]{7,40}
    ChangesNeeds approval
db-1ops@203.0.113.9

No commands allowed on this server

Always blocked
  • rm -rf *
  • shutdown *
  • * > /dev/sd*
  • curl * | sh

Props

CommandWhitelist

PropTypeNotes
serversWhitelistServer[]Required
blocked?string[]Patterns refused on every server, whatever the list says.
actions?(command: WhitelistCommand, server: WhitelistServer) => ReactNodeRow actions (edit, remove), e.g. IconButtons or a Menu.
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.