Skip to content

feat(auth): add Workload Identity Federation (OIDC) support#1424

Draft
philross wants to merge 2 commits into
stackitcloud:mainfrom
philross:feat/wif-auth-support
Draft

feat(auth): add Workload Identity Federation (OIDC) support#1424
philross wants to merge 2 commits into
stackitcloud:mainfrom
philross:feat/wif-auth-support

Conversation

@philross
Copy link
Copy Markdown

@philross philross commented Jun 1, 2026

Description

Adds Workload Identity Federation (OIDC) support so CI/CD pipelines can authenticate without long-lived service account key files. The CLI exchanges a short-lived OIDC token for a STACKIT access token using the go SDK's WIF flow.

  • New internal/pkg/auth/auth.go with env-var helpers (STACKIT_USE_OIDC, STACKIT_SERVICE_ACCOUNT_EMAIL, STACKIT_SERVICE_ACCOUNT_FEDERATED_TOKEN)
  • Auto-detects token source: env var → GitHub Actions → Azure Pipelines
  • No credentials are written to disk in WIF mode
  • Updated AUTHENTICATION.md with setup guide

relates to #1327

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • 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)

philross added 2 commits May 29, 2026 22:19
Allows CI/CD pipelines to authenticate without long-lived service account
key files by exchanging a short-lived OIDC token for a STACKIT access token.
@philross
Copy link
Copy Markdown
Author

philross commented Jun 1, 2026

Before I continue working on this feature: Is the introduction of environment variables (STACKIT_USE_OIDC, STACKIT_SERVICE_ACCOUNT_EMAIL, STACKIT_SERVICE_ACCOUNT_FEDERATED_TOKEN) mentioned in #1327 the right approach, or should CLI flags (e.g. --use-oidc) be added instead?

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

Successfully merging this pull request may close these issues.

1 participant