Skip to content

fix: Support reading STACKIT_SERVICE_CONNECTION_ID on Azure Pipelines - #1680

Open
JorTurFer wants to merge 1 commit into
stackitcloud:mainfrom
JorTurFer:support-wif
Open

JorTurFer wants to merge 1 commit into
stackitcloud:mainfrom
JorTurFer:support-wif

Conversation

@JorTurFer

@JorTurFer JorTurFer commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #1668

Changes

Read STACKIT_SERVICE_CONNECTION_ID on Azure Pipelines

When running in Azure DevOps with the STACKIT Service Connection, the CLI now passes STACKIT_SERVICE_CONNECTION_ID to oidcadapters.RequestAzureDevOpsOIDCToken, the same way the Terraform provider does. Without this, the CLI and Terraform get OIDC tokens with a different sub when they run in the same pipeline, so the same federated identity provider assertions can't serve both.

This PR doesn't change that mode: the env-based path in AuthenticationConfig is untouched. While testing, we noticed it only works for commands that just call an API. Commands that read the stored session fail when nothing was activated:

Command Failure
project list (without --parent-id/--member), project create get email of authenticated user: error getting profile email. email is empty
organization list the request is sent with an empty member
auth get-access-token, curl, ske kubeconfig login UserSessionExpired() fails parsing the empty SESSION_EXPIRES_AT_UNIX

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

🤖 Generated with Claude Code

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
@JorTurFer
JorTurFer marked this pull request as ready for review October 17, 2026 01:12
@JorTurFer
JorTurFer requested a review from a team as a code owner October 17, 2026 01:12
Comment thread internal/pkg/auth/service_account.go Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Azure DevOps STACKIT Service Connection

3 participants