StackStorm / StackStorm/st2

Ignore certificate validation for index_url

Open
#5,980 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Stackstorm v3.8.0 running on RHEL 7.9

Stackstorm instance is running behind firewall, there is no access to intenet, there is no proxy servers for instance either.

stackstorm can't access index.json file located in "https://exchange.stackstorm.org/v1/index.json". Due to this, st2 web UI will never show packs infomation after "Packs" button clicked, always blank.

Thus I download index.json file from github, and put it to our internal web server(nginx) where stackstorm instance can access, and re-configure st2.conf file, point index_url to our web server which acces via https

[content]
index_url=https://pln-n1-eso4sap4.env01.mcloud.entsvcs.net:8080/st2/index.json

Because of self-signed certificate is used by web server, stackstorm instance can't pass validation when it access web server, and I found error message in st2api.log

2023-05-19 02:35:49,788 140355129762016 ERROR packs [-] Index parsing error: {
"url": "https://pln-n1-eso4sap1.env01.mcloud.entsvcs.net:8080/st2/index.json",
"packs": 0,
"message": "SSLError(MaxRetryError("HTTPSConnectionPool(host='pln-n1-eso4sap1.env01.mcloud.entsvcs.net', port=8080): Max retries exceeded with url: /st2/index.json (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:877)'),))",),)",
"error": "unresponsive"
}
2023-05-19 02:35:49,788 140355129762016 ERROR router [-] Failed to call controller function "get_all" for operation "st2api.controllers.v1.packs:packs_controller.index.get_all": No results from the index: tried https://pln-n1-eso4sap1.env01.mcloud.entsvcs.net:8080/st2/index.json.
Status: [
{
"url": "https://pln-n1-eso4sap1.env01.mcloud.entsvcs.net:8080/st2/index.json",
"packs": 0,
"message": "SSLError(MaxRetryError("HTTPSConnectionPool(host='pln-n1-eso4sap1.env01.mcloud.entsvcs.net', port=8080): Max retries exceeded with url: /st2/index.json (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:877)'),))",),)",
"error": "unresponsive"
}
]

Have any settings to ignore certificate verification? or any method workaround?

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 with the index_url setting in st2.conf and reproduce the failure against the self-signed HTTPS index described in the issue. Trace the pack index retrieval path that produces the st2api.log error, then determine the expected certificate-validation configuration and verify that the Packs view can load the internal index without weakening unrelated HTTPS requests.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.