feat(ske): support stateless WIF kubeconfig login - #1477
feat(ske): support stateless WIF kubeconfig login#1477Galin-Karabadzhakov wants to merge 22 commits into
Conversation
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
|
Hi team, could you please confirm whether this approach aligns with the intended direction for non-interactive SKE authentication? |
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
Co-authored-by: Marcel Jacek <72880145+marceljk@users.noreply.github.com>
Galin-Karabadzhakov
left a comment
There was a problem hiding this comment.
Thanks for the review. All requested changes have now been addressed:
- Explicit flags/global configuration take precedence over KUBERNETES_EXEC_INFO, which remains the fallback.
- auth.OIDCTokenFunc() is used for workload-identity detection and SDK WIF configuration.
- Static tokens, configured token files, GitHub Actions, Azure DevOps, and Kubernetes projected-token fallback are covered.
- Stateless IdP endpoint discovery avoids authentication storage.
Validation completed successfully with focused unit tests, go vet, and make lint. Please re-review when convenient.
Description
Enable
stackit ske kubeconfig login --idpto operate as a stateless Kubernetes exec credential provider using STACKIT Workload Identity Federation.Kubernetes clients do not always include cluster information in
KUBERNETES_EXEC_INFO, and in-cluster workloads should not require persisted CLI credentials or cache state.This change:
STACKIT_FEDERATED_TOKEN_FILE.STACKIT_ACCESS_TOKEN.Relates to #1327.
This is complementary to #1424, which introduces general WIF authentication support.
Validation
make fmtmake generate-docsmake lintmake buildgo test ./internal/pkg/auth ./internal/cmd/ske/kubeconfig/loginThe repository-wide
make testcurrently reports two unrelated failures that were reproduced on an unchangedmaincheckout.Checklist
make fmtmake generate-docsmake lint