StackStorm / StackStorm/st2

st2client always returns 403

Open
#5,486 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

SUMMARY

st2client always returns 403 while trying to read from Datastore.

STACKSTORM VERSION

st2 3.6.0, on Python 3.6.9

OS, environment, install method

https://github.com/StackStorm/st2-docker
Up and running behind enterprise proxy.

Steps to reproduce the problem

Inside any Python action.

from st2client.client import Client
c = Client(api_key="<VALID_API_KEY>")
# c = Client(token="<VALID_TOKEN>")
# c = Client()
c.keys.get_by_name(name="anykey")

Expected Results

Value from Datastore, if it exists

Actual Results

403 Client Error: Forbidden

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 st2client.client.Client calls shown in the report and trace the Datastore request made by c.keys.get_by_name(name="anykey"). Compare behavior with an API key, token, and default client inside a Python action, including the reported enterprise-proxy environment. Done means identifying why valid credentials receive 403 and confirming that an appropriate client configuration can read an existing Datastore value.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.