-
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 support for interactive login on terminal based hosts(without browser) for tanzu context #645
Add support for interactive login on terminal based hosts(without browser) for tanzu context #645
Conversation
d21b40b
to
674f3aa
Compare
674f3aa
to
9319ab2
Compare
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!
Have a few nits on naming consistency stuff.
Also the release notes has a typo. You should also mention the env var introduced there as well.
I suggest we add a section in our markdown docs to describe the interactive login flow, in which the env var can also be mentioned. With the section available, it would be a good idea in the context create --help output to reference said section.
9319ab2
to
f88c5ac
Compare
…wser) for tanzu context - Add support for interactive login on terminal based hosts for tanzu context. CLI would prompt the authorization URL so that user can open the URL in the host having browser and then copy the authcode manually to complete the login. - User can choose the local listener port for callback URLs during OAuth authorization flow by setting the TANZU_CLI_OAUTH_LOCAL_LISTENER_PORT environment variable with port number user want to use on the local host. Signed-off-by: Prem Kumar Kalle <pkalle@vmware.com>
f88c5ac
to
20cd318
Compare
Thanks @vuil . I will add the markdown docs in a follow up PR. |
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.
lgtm, thanks for the updates and a nice set of changes!
What this PR does / why we need it
This PR adds support for interactive login on terminal based hosts for tanzu context
Changes summary:
Which issue(s) this PR fixes
Fixes #
Describe testing done for PR
Copied the tanzu binary to terminal based host and created tanzu context successfully( opened the auth URL posted on the terminal on the local machine browser and copied the auth code from the browser URL)
Tested copying invlaid auth code , and CLI errors ourt as expected.
Verified the kubectl triggers the interactive login and allows user to copy the auth code, and once the auth code is pasted the login flow was successful.
create a tanzu context on my mac (with browser) without setting the environment variable for local host listener port and it was successful( CLI opens a random port)
created tanzu context successfully with local listener port set using the environment variable
TANZU_CLI_OAUTH_LOCAL_LISTENER_PORT
with 8645Tested with invalid port and CLI errors out as expected.
Release note
Additional information
Special notes for your reviewer