Skip to content

Conversation

@areese
Copy link
Contributor

@areese areese commented Jul 8, 2019

Add a --stdin option to configure, so that the password will always be read from stdin instead of stored in a file.

@areese areese mentioned this pull request Jul 8, 2019
@areese areese force-pushed the oss_patch_hide_password branch from da10f3d to a629bd5 Compare July 8, 2019 16:12
@areese
Copy link
Contributor Author

areese commented Jul 8, 2019

This is very similar to: #123

config = ProfileConfigProvider(profile).get_config() or DatabricksConfig.empty()
host = click.prompt(PROMPT_HOST, default=config.host, type=_DbfsHost())
username = click.prompt(PROMPT_USERNAME, default=config.username)
password = 'stdin'
Copy link
Contributor

Choose a reason for hiding this comment

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

What if my password is stdin? I know this password is probably not allowed in most sign up workflows in Databricks but I'd rather not special case this password..

Can we just add a flag called read_password_from_stdin or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

excellent point, let me rework this that way.
How about empty password? Would that be an ok choice or would you rather use a flag?

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 a flag is probably just the cleanest way.

@areese areese force-pushed the oss_patch_hide_password branch from b723e68 to 57facd4 Compare July 11, 2019 15:02
areese added 2 commits July 16, 2019 09:51
    Add a --stdin option to configure, so that the password will always be read from stdin instead of stored in a file.
@areese areese force-pushed the oss_patch_hide_password branch from 57facd4 to 44d3ba4 Compare July 16, 2019 16:51
@codecov-io
Copy link

Codecov Report

Merging #244 into master will decrease coverage by 0.31%.
The diff coverage is 55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #244      +/-   ##
==========================================
- Coverage   82.95%   82.63%   -0.32%     
==========================================
  Files          31       31              
  Lines        2047     2062      +15     
==========================================
+ Hits         1698     1704       +6     
- Misses        349      358       +9
Impacted Files Coverage Δ
databricks_cli/configure/cli.py 80.76% <41.66%> (-12.09%) ⬇️
databricks_cli/configure/provider.py 94.3% <75%> (-1.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4ab076...44d3ba4. Read the comment docs.

@areese
Copy link
Contributor Author

areese commented Aug 14, 2020

I'm going to close this. I ended up with a new patch to hide the token, and I never ended up using the stdin option after all.

@areese areese closed this Aug 14, 2020
@areese areese deleted the oss_patch_hide_password branch August 14, 2020 19:52
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.

3 participants