Skip to content
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

cli/demo: avoid login URL if insecure #58662

Merged
merged 1 commit into from
Jan 11, 2021
Merged

Conversation

knz
Copy link
Contributor

@knz knz commented Jan 8, 2021

Fixes #58661

NB: insecure is deprecated anyway #53404

@knz knz requested a review from otan January 8, 2021 18:27
@knz knz requested a review from a team as a code owner January 8, 2021 18:27
@cockroach-teamcity
Copy link
Member

This change is Reviewable

}
serverURL.Path = server.DemoLoginPath
serverURL.RawQuery = pwauth.Encode()
}
fmt.Fprintf(w, " (console) %s\n", serverURL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this still prints the console link, do you mean avoid the link as in avoid printing username and password, or something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the URL must be printed in any case, what needs to be skipped is the autologin URL path.

serverURL.Path = server.DemoLoginPath
serverURL.RawQuery = pwauth.Encode()
if !demoCtx.insecure {
// Print node ID and console URL. Embed the autologin feature inside the URL.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worth a comment about why we do not do this for insecure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done.

@knz
Copy link
Contributor Author

knz commented Jan 11, 2021

TFYR

bors r=otan

@craig
Copy link
Contributor

craig bot commented Jan 11, 2021

Build failed:

@knz
Copy link
Contributor Author

knz commented Jan 11, 2021

bors r=otan

@craig
Copy link
Contributor

craig bot commented Jan 11, 2021

Build succeeded:

@craig craig bot merged commit 23c9843 into cockroachdb:master Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: Demo's link to the DB console doesn't work in with --insecure
3 participants