StackStorm / StackStorm/st2

Feature Request: Action-Alias private/public flag

Open
#4,559 5 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

chatops feature help wanted proposal security
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

SUMMARY

In certain ChatOps cases it is desirable to limit action-alias triggers/results to a public or private channel for data privacy reasons.

ISSUE TYPE
  • Feature Idea
STACKSTORM VERSION

N/A

OS / ENVIRONMENT / INSTALL METHOD

N/A

STEPS TO REPRODUCE

To support this feature, the action-alias data structure could be extended to include a privacy flag at the root and result level. The privacy flag accepts a string type with valid values being:

trigger privacy

  • public: action-alias triggered only in a public channel.
  • private: action-alias triggered only in a private channel.
  • any: action-alias triggered in either public or private channel.

result privacy

  • public: action-alias result sent to public channel only.
  • private: action-alias result sent to private channel only.
  • any: action-alias result sent to either public or private channel.

The flags combinations would imply the following behaviour:

ActionAlias Privacy flag Response
Triggered Trigger Result
-- -- -- --
public private private reject trigger
public private public reject trigger
public private any reject trigger
public public private result to user
public public public result to channel
public public any result to channel
public any private result to user
public any public result to channel
public any any result to channel
-- -- -- --
private private private result to user
private private public reject trigger : public channel not available with 1 to 1 communication.
private private any result to user
private public private reject trigger
private public public reject trigger
private public any reject trigger
private any private result to user
private any public reject trigger : public channel not available with 1 to 1 communication.
private any any result to user

YAML definition would permit the addition of these items in an action-alias definition.

privacy: <"public"|"private"|"any">
result:
  privacy: <"public"|"private"|"any">

It is the calling codes responsibility to interpret and apply the correct meaning of public, private, any in the context of the backend being used.

EXPECTED RESULTS

As an example of ChatOps using the Slack backend:

---
name: "kitten"
pack: "kitten"
description: "Post a kitten picture to cheer people up."
action_ref: "core.noop"
privacy: "any"
formats:
  - "kitten pic"
ack:
  enabled: false
result:
  privacy: "public"
  format: "your kittens are here! {~} Regards from the Box Kingdom."
  extra:
    slack:
      image_url: "http://i.imgur.com/Gb9kAYK.jpg"
      fields:
        - title: Kitten headcount
          value: Eight.
          short: true
        - title: Number of boxes
          value: A bunch.
          short: true
      color: "#00AA00"

In the above example the bot would enforce !kitten pic to be triggered in a public channel with the result being sent to that public channel.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the action-alias data structure and the calling code that interprets trigger and result privacy; done means the YAML flags are supported and the public/private behavior matches the combinations in the issue’s matrix.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.