[ 
https://issues.apache.org/jira/browse/HIVE-13589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434269#comment-15434269
 ] 

Ke Jia commented on HIVE-13589:
-------------------------------

Hi [~vihangk1], [~Ferd], current patch can prompt for the password when the 
password is null or empty string. Howerver,if the case with "-p" option does 
not follow the specified option which are added in the Beeline.java 
[L290-L391], the Apache Common CLI will consider the option as the value of 
"-p" argument. For example, "hive --service beeline -u 
jdbc:hive2://localhost:10000  -n root -p --force=true -e 'show tables;'", 
because the "--force" option is not added in the Beeline.java, the Apache 
Common CLI set "--force=true" to the "-p" option. So when it execute the code 
which you mentioned above, the password is not null and will not prompt for 
password. Avoiding the bad user-experience, do you think we need to add all the 
options in the Beeline.java? 

> beeline - support prompt for password with '-u' option
> ------------------------------------------------------
>
>                 Key: HIVE-13589
>                 URL: https://issues.apache.org/jira/browse/HIVE-13589
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>            Reporter: Thejas M Nair
>            Assignee: Ke Jia
>         Attachments: HIVE-13589.1.patch, HIVE-13589.2.patch, 
> HIVE-13589.3.patch
>
>
> Specifying connection string using commandline options in beeline is 
> convenient, as it gets saved in shell command history, and it is easy to 
> retrieve it from there.
> However, specifying the password in command prompt is not secure as it gets 
> displayed on screen and saved in the history.
> It should be possible to specify '-p' without an argument to make beeline 
> prompt for password.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to