Open
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces authentication to the Vega CLI, requiring users to log in before executing most commands. It adds support for OAuth2 device code flow using Ory Hydra, including login/logout commands and multi-profile token management. The cluster creation workflow now records the authenticated user's TenantId in Kubernetes for downstream tooling. The codebase is refactored to integrate authentication checks and services throughout the CLI.
Authentication and Identity Management
LoginCommandandLogoutCommandto the CLI, supporting device code flow authentication and multi-profile management. Credentials are stored locally, and refresh tokens are used for automatic renewal. [1] [2]AuthServiceandHydraDeviceFlowClientfor OAuth2 device flow, token storage, refresh handling, and JWT claim extraction (TenantId). [1] [2] [3]Command and Workflow Changes
AppCommandto include login/logout commands, and updatedProgram.csto enforce authentication before running most commands. [1] [2]CreateClusterCommandto require authentication and write a ConfigMap containing the user's TenantId in thevega-systemnamespace during cluster creation. [1] [2] [3] [4]Documentation Updates
ReadMe.mdwith new authentication instructions, login/logout usage, and details about token storage and TenantId propagation. [1] [2]Configuration
GlobalConfigurationfor easy customization.Dependency Injection
These changes collectively introduce robust authentication, improve security, and enable user identity propagation throughout the Vega CLI and cluster lifecycle.