StackStorm / StackStorm/st2

Add "decrypt" param to native st2kv function, deprecate "decrypt_kv" filter

Open
#3,571 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

complexity:medium documentation enhancement security
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

https://github.com/StackStorm/st2mistral/pull/30 modified the way that st2kv worked for encrypted values - it no longer decrypts by default, and users must explicitly ask for this via the decrypt parameter for that function. Because st2kv (within the context of mistral) natively offers decryption, the decrypt_kv filter that currently exists natively in StackStorm was not needed, and therefore not included in the filters copied over to Mistral.

However, we now have a bit of a functionality mismatch between Mistral workflows and the usage of st2kv elsewhere in StackStorm, such as in ActionChain workflows.

So, we should do a few things:

  • Add the ability to provide the same decrypt parameter to the st2-native st2kv function. The function does not currently decrypt by default, so that part is consistent with mistral's st2kv, but it should be something the user can specify in params if they want decryption to take place. This is just a parameter addition, so this shouldn't be a breaking change.
  • If the previous change is made, decrypt_kv filter is no longer needed and should be deprecated. Care should be taken to ensure that the surrounding work in https://github.com/StackStorm/st2/pull/2939 is not undone - only the removal of the unneeded filter.
  • Update documentation, letting users know of the new parameter to st2kv as well as the deprecation of decrypt_kv.
  • Update examples in examples pack with new usages
  • Add/update integration or unit tests as needed

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

Start by locating the native st2kv function and the existing decrypt_kv filter, then review the linked st2mistral and StackStorm pull requests for compatibility constraints. Update the st2kv documentation and examples pack, deprecate only the unneeded filter behavior, and add or update integration or unit tests. Done means users can request decryption through st2kv and the deprecation is documented without undoing the related filter work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, documentation, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.