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

Include url_hosts_whitelist with my user and password parameter when I use core action core.http #6083

Open
lucasfontini opened this issue Dec 6, 2023 · 1 comment

Comments

@lucasfontini
Copy link

SUMMARY

I've been suffering with a bug into my workflow, when I use a core.http task I've noticed that a url_hosts_whitelist and password are filled automaticaly, even withdrawing these line on code, when I save, theses line back into my code.

STACKSTORM VERSION

Paste the output of st2 --version:
st2 3.8.0, on Python 3.8.10

OS, environment, install method

Post what OS you are running this on, along with any other relevant information/
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

Installed manually

Steps to reproduce the problem

Show how to reproduce the problem, using a minimal test-case. Make sure to include any content
(pack content - workflows, actions, etc.) which are needed to reproduce the problem.

  • create a workflow > insert name , include a http.core action, fill the url like google.com , set a method get > set header - execute the workflow / close the file, check the result in history > open the workflow and it will apper these parameters filled automaticaly
    version: 1.0
    tasks:

    [510, 272]

    task1:
    action: core.http
    input:
    url: "https://www.google.com.br/"
    method: GET
    headers:
    TEST: TEST
    url_hosts_whitelist:
    - myuserstackstorm
    password: cannot shwo the password
    next:
    - do:
    - task2

    [528, 384]

    task2:
    action: core.echo
    input:
    message: TEST

Expected Results

http google page

What did you expect to happen when running the steps above?

    "traceback": "  File \"/opt/stackstorm/st2/lib/python3.8/site-packages/st2actions/container/base.py\", line 132, in _do_run
(status, result, context) = runner.run(action_params)

File "/opt/stackstorm/st2/lib/python3.8/site-packages/http_runner/http_runner.py", line 116, in run
result = client.run()
File "/opt/stackstorm/st2/lib/python3.8/site-packages/http_runner/http_runner.py", line 262, in run
raise ValueError('URL "%s" is not whitelisted' % (self.url))
"

Actual Results

What happened? What output did you get?
an error , if I delete theses lines and save for a many times I can be able to run the workflow and obtain the expected result

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

@Abhi5h3k
Copy link

Hey @lucasfontini, Were you able to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants