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

Correct code example for CLI auth with env variable #17594

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

blvckcoffee
Copy link
Member

Description

  • Updates code example and text for CLI password authentication after setting TRINO_PASSWORD environment variable
  • Current behavior requires --password in CLI code snippet even after setting the TRINO_PASSWORD environment variable. If --password is not provided, trino CLI will appear to start without CLI prompt for password, but running SQL results in "Error running command: Authentication failed: Authentication required"

Additional context and related issues

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label May 22, 2023
@blvckcoffee blvckcoffee requested review from mosabua and colebow May 22, 2023 15:50
@blvckcoffee
Copy link
Member Author

Tested functionality with @mosabua. Trino docs should reflect that --password is required to avoid authentication error messaging.

@github-actions github-actions bot added the docs label May 22, 2023
@mosabua
Copy link
Member

mosabua commented May 23, 2023

The real problem is that even with TRINO_PASSWORD set a user must use --password so the value is used. If --password is not used .. the value is NOT used and the CLI starts through and gets to the trino> prompt .. but then running any query fails. This is a bad user experience and in my opinion a bug in the code. Could you check and fix @electrum .. and maybe we merge the docs now anyway since the current docs are incorrect?

@mosabua mosabua requested a review from electrum May 23, 2023 15:29
@mosabua
Copy link
Member

mosabua commented Jun 6, 2023

Could you please review and confirm @electrum ?

@mosabua
Copy link
Member

mosabua commented Jun 7, 2023

Discussed and confirmed on slack with @electrum

@mosabua mosabua merged commit 2433d9e into trinodb:master Jun 7, 2023
@github-actions github-actions bot added this to the 420 milestone Jun 7, 2023
@ebyhr
Copy link
Member

ebyhr commented Jun 7, 2023

@blvckcoffee I would recommend using reserved keywords (e.g. fixes #xxx) in PR description so that we can close the issue automatically. https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests

@mosabua
Copy link
Member

mosabua commented Jun 7, 2023

Thanks for picking that up @ebyhr .. I was under the wrong impression that "Fix" also does the job..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants