Skip to content

Action re-run fails when action contains a secret parameter #3339

Description

@sidkrishna

Re-runs for actions that contain a secret param eg. password fail both from CLI and UI. This is happening most probably because the parameter gets passed as ****** instead of the actual value.
If one changes the param from **** to actual text, it works.

Logs:

brocade@BWC:/opt/stackstorm/packs$ st2 execution list -n 1
+--------------------------+-----------------------+--------------+------------------------+-----------------------+--------------------+
| id                       | action.ref            | context.user | status                 | start_timestamp       | end_timestamp      |
+--------------------------+-----------------------+--------------+------------------------+-----------------------+--------------------+
| 58e605f2c3540c086edb46b6 | network_essentials.ge | st2admin     | succeeded (2s elapsed) | Thu, 06 Apr 2017      | Thu, 06 Apr 2017   |
|                          | t_switch_details      |              |                        | 09:10:10 UTC          | 09:10:12 UTC       |
+--------------------------+-----------------------+--------------+------------------------+-----------------------+--------------------+
brocade@BWC:/opt/stackstorm/packs$ st2 execution re-run 58e605f2c3540c086edb46b6
...
id: 58e60699c3540c086edb46b8
status: failed
parameters:
  mgmt_ip: 10.26.7.223
  password: '********'
  username: admin
result:
  exit_code: 1
  result: None
  stderr: "Traceback (most recent call last):
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 242, in <module>
    obj.run()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 154, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/network_essentials/actions/get_switch_details.py", line 36, in run
    raise ValueError(e)
ValueError: AuthenticationException('Authentication failed.',)
"
  stdout: ''

Here, I am re-running the first action which completed successfully earlier but the re-run fails with authentication failure. The same behavior is seen from the UI. I've tested this with more actions/workflows as well.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions