8000 GitHub Β· Where software is built
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Help command should only list commands the user is allowed to runΒ #195
Open
@blag

Description

@blag

A customer asked for this feature.

The !help command currently just dumps every command that is loaded by st2chatops. This is due to how hubot commands are loaded (into robot.commands) and how the hubot-help plugin works.

It would be helpful if the bot only dumped out commands that the authenticated ChatOps user can run. This would reduce confusion, because the situation right now amounts to:

  1. User chats !help
  2. Hubot dumps all loaded ST2 commands
  3. User starts trying to run listed commands
  4. ST2 RBAC returns authorization errors
  5. User has to iterate through entire list to figure out what they can run

A few additional notes:

  • SECURITY: If results are dumped back into a public channel and that channel history is accessible to all users, it would allow a malicious user or an attacker to target users that can run commands the attacker is interested in.
  • ChatOps RBAC extensions to only allow certain commands to only be run in certain channels/by certain users (#2481, #4559) will have different results depending on which channel the !help is run from, or it would require a complete listing of the allowed commands on a per-channel basis. This listing can grow very quickly, so this feature would greatly complicate that feature.
    Example:
    !help
    
    #public-channel
    ---------------
    * do_thing_1
    * do_thing_2
    
    #private-channel-aaylmao
    ------------------------
    * do_thing_1
    * do_thing_3
    * do_thing_4
    
    #private-channel-omgstahp
    -------------------------
    * do_thing_2
    * do_thing_5
    
  • ChatOps RBAC extensions to only allow certain users to run some commands with only certain parameters (eg: restrictions on hostname parameter) will similarly be complicated by this feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0