Description
When using STACKIT_ACCESS_TOKEN in container environments, certain CLI commands (e.g. project create) fail despite the token being valid.
Steps to reproduce
- Set
STACKIT_ACCESS_TOKEN as an environment variable with a valid token
- Pass this token to a container, where the stackit-cli ist installed, but not configured otherwise.
- Run
stackit project create --parent-id xxxx --name my-project
Actual behavior
The command fails with:
Error: build project creation request: get authentication flow: read from keyring: exec: "dbus-launch": executable file not found in $PATH, read from encoded file as fallback: value not found
Even though STACKIT_ACCESS_TOKEN is set and API calls to other endpoints work fine.
Expected behavior
When STACKIT_ACCESS_TOKEN is set, all cli command should be possible.
Environment
- OS: alpine:3.24.0
- Version of STACKIT CLI (see
stackit --version): 0.63.0
Additional information
After looking into it, I saw that project create additionally calls auth.GetAuthFlow() directly in buildRequest() to determine the owner email for the project membership payload. Seems that GetAuthFlow() is not aware of STACKIT_ACCESS_TOKEN and always reads auth_flow_type exclusively from the auth storage backend (keyring or fallback file).
Description
When using
STACKIT_ACCESS_TOKENin container environments, certain CLI commands (e.g.project create) fail despite the token being valid.Steps to reproduce
STACKIT_ACCESS_TOKENas an environment variable with a valid tokenstackit project create --parent-id xxxx --name my-projectActual behavior
The command fails with:
Error: build project creation request: get authentication flow: read from keyring: exec: "dbus-launch": executable file not found in $PATH, read from encoded file as fallback: value not foundEven though
STACKIT_ACCESS_TOKENis set and API calls to other endpoints work fine.Expected behavior
When
STACKIT_ACCESS_TOKENis set, all cli command should be possible.Environment
stackit --version):0.63.0Additional information
After looking into it, I saw that
project createadditionally callsauth.GetAuthFlow()directly inbuildRequest()to determine the owner email for the project membership payload. Seems thatGetAuthFlow()is not aware ofSTACKIT_ACCESS_TOKENand always readsauth_flow_typeexclusively from the auth storage backend (keyring or fallback file).