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.
Activity