feat(ske): support stateless WIF kubeconfig login - #1477
feat(ske): support stateless WIF kubeconfig login#1477Galin-Karabadzhakov wants to merge 23 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.
Galin-Karabadzhakov
left a comment
There was a problem hiding this comment.
Implemented and pushed commit 3de94aa to PR #1477.
Changes:
- Explicit flags override all sources.
- KUBERNETES_EXEC_INFO overrides global CLI configuration.
- Global configuration fills missing exec values.
- Added tests for all four precedence combinations.
- Added the precedence table to CLI help and generated docs.
SKE tests, vet, docs check, and lint pass. Full tests only encountered an unrelated ANSI-color snapshot failure in the CDN package.
marceljk
left a comment
There was a problem hiding this comment.
Thanks for your contribution!
Left only one nitpick comment, and besides that, it looks good from my side.
Galin-Karabadzhakov
left a comment
There was a problem hiding this comment.
Thanks for the review. Agreed on the final formatting nitpick. I’ll align the table for terminal output and regenerate the documentation. No functional changes are required.
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