-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add interactive(browser) login support for 'tanzu' context creation #627
Merged
prkalle
merged 1 commit into
vmware-tanzu:main
from
prkalle:feature/interactive_tanzu_login
Jan 2, 2024
Merged
Add interactive(browser) login support for 'tanzu' context creation #627
prkalle
merged 1 commit into
vmware-tanzu:main
from
prkalle:feature/interactive_tanzu_login
Jan 2, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prkalle
commented
Dec 22, 2023
prkalle
force-pushed
the
feature/interactive_tanzu_login
branch
from
December 23, 2023 00:14
7fecf24
to
c31bf8f
Compare
vuil
reviewed
Dec 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice set of changes!
Mostly nits on comments/outputs.
prkalle
force-pushed
the
feature/interactive_tanzu_login
branch
from
December 28, 2023 00:56
8d834fd
to
72be34a
Compare
vuil
approved these changes
Jan 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the refactoring and other updates.
I gave a suggestion on the envvar name.
prkalle
force-pushed
the
feature/interactive_tanzu_login
branch
from
January 2, 2024 21:28
72be34a
to
e270cc2
Compare
- Added interactive login support for 'tanzu' context creation. This will serve as the default login experience for users creating a 'tanzu' context. The existing API Token-based context creation will continue to function, supporting automated login flows where user interaction is not required. However, the CLI will no longer prompt for an API Token. Instead, it will check if the TANZU_API_TOKEN environment variable is set and use it if available. If the API Token is not set, the CLI will default to an interactive (browser-based) login flow. - The interactive login flow logs into the default organization, which is either set by the user in the CSP portal or is the first organization in the user's organization list. Users can override this default by setting the environment variable "TANZU_CLI_CLOUD_SERVICES_ORGANIZATION_ID" to the organization ID they choose for login. Signed-off-by: Prem Kumar Kalle <pkalle@vmware.com>
prkalle
force-pushed
the
feature/interactive_tanzu_login
branch
from
January 2, 2024 21:56
e270cc2
to
ccb79b7
Compare
anujc25
added
kind/feature
Categorizes issue or PR as related to a new feature
docs-impact
issues with documentation impact
labels
Jan 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla-not-required
docs-impact
issues with documentation impact
documentation
Improvements or additions to documentation
kind/feature
Categorizes issue or PR as related to a new feature
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.
What this PR does / why we need it
This PR adds interactive(browser) login support for 'tanzu' context creation.
Changes summary:
Added interactive login support for 'tanzu' context creation. This will serve as the default login experience for users creating a 'tanzu' context. The existing API Token-based context creation will continue to function, supporting automated login flows where user interaction is not required. However, the CLI will no longer prompt for an API Token. Instead, it will check if the TANZU_API_TOKEN environment variable is set and use it if available. If the API Token is not set, the CLI will default to an interactive (browser-based) login flow.
The interactive login flow logs into the default organization, which is either set by the user in the CSP portal or is the first organization in the user's organization list. Users can override this default by setting the environment variable
"TANZU_CLI_CSP_LOGIN_ORG_ID""TANZU_CLI_CLOUD_SERVICES_ORGANIZATION_ID"to the organization ID they choose for login.Which issue(s) this PR fixes
Fixes #
Describe testing done for PR
TANZU_CLI_CSP_LOGIN_ORG_ID
toOne Tanzu Demo
organization and then created a tanzu context.Release note
Additional information
Special notes for your reviewer