gee_asset_manager icon indicating copy to clipboard operation
gee_asset_manager copied to clipboard

Password as an additional argument

Open nazmussazib opened this issue 6 years ago • 3 comments

Is it possible to include password as an additional argument, as at present I need to provide the password manually every time while uploading the data which is not really convenient while updating a asset with new sets of data every week. Thanks.

nazmussazib avatar Aug 27 '18 14:08 nazmussazib

Hi @nazmussazib this is just my interpretation that the reason this is not implemented is that it is not secure to have a password in bash history. However, if you really want to change that go to line 76 https://github.com/tracek/gee_asset_manager/blob/master/gee_asset_manager/batch_uploader.py#L76

A quick way would be to change password = getpass.getpass() Change this line to password="whatever is your password"

Note this means your password is hardcoded in your program, and both passing it with as an argument to be recorded as history as well as saving it in the program are risky and not recommended if your computer is shared. I will let @tracek jump in on this.

Hope that helps, Sam

samapriya avatar Aug 27 '18 15:08 samapriya

Thanks for your help @samapriya, I concur with your comments.

nazmussazib avatar Aug 27 '18 16:08 nazmussazib

Sure, I think I could add this option. The easiest approach would be to store the hashed password with some salt. It's not exactly hack-proof, but good enough for most of users. What do you think? The password would be then stored in your e.g. script directory. Optional for those bothered enough.

Thanks @samapriya for chipping in!

tracek avatar Aug 27 '18 17:08 tracek