Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the datastore documentation regarding the usage of st2kv #1144

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/source/datastore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ the parameter definition:
default: "{{ st2kv.system.username }}"
password:
type: string
default: "{{ st2kv.system.password | decrypt_kv }}"
default: "{{ st2kv('system.password', decrypt=true) }}"
secret: true
num_network_adapters:
type: integer
Expand Down Expand Up @@ -630,16 +630,16 @@ only. To get plain text, please run the command with the ``--decrypt`` flag:

If you are using system scoped (``st2kv.system``) or user scoped (``st2kv.user``) datastore items
to store secrets, you can decrypt them and use as parameter values in rules or actions. This is
supported via Jinja filter ``decrypt_kv`` (read more about :ref:`Jinja filters<applying-filters-with-jinja>`).
supported with the ``decrypt=true`` argument.
For example, to pass a decrypted password as a rule parameter, use:

.. code-block:: YAML

aws_key: "{{st2kv.system.aws_key | decrypt_kv}}"
aws_key: "{{st2kv('system.aws_key', decrypt=true)}}"

.. note::

When using ``decrypt_kv`` Jinja filter on a default value of an action parameter you should
When using the ``decrypt=true`` argument on a default value of an action parameter you should
also mark that parameter as secret (``secret: true``). If you don't do that, every user who
has permission to run (execution) that action will be able to view raw unencryted value of
that datastore item when executing an action.
Expand Down