NDAR / nda-tools

Python package for interacting with NDA web services. Used to validate, submit, and download data to and from NDA.
MIT License
47 stars 22 forks source link

Is authentication required for validation? #56

Closed liningpan closed 1 year ago

liningpan commented 1 year ago

Previously, we don't need to provide username and password for validation, but this recent change suggests otherwise.

https://github.com/NDAR/nda-tools/blob/16e8c26abb364dde51c205891b5c6b40f32b0a69/NDATools/Validation.py#L61

gregmagdits commented 1 year ago

Right. I believe we want to allow users to validate without providing credentials so we might be updating this back to the way it worked before. Until that is available though you will need to provide your NDA creds

liningpan commented 1 year ago

But I think auth_req is false when doing validation, it won't prompt for password neither will it try to read from keyring

https://github.com/NDAR/nda-tools/blob/16e8c26abb364dde51c205891b5c6b40f32b0a69/NDATools/clientscripts/vtcmd.py#L115-L128

liningpan commented 1 year ago

So, for now I also need the -b flag as described here #53?

gregmagdits commented 1 year ago

The -b flag is supposed to be used when you are actually trying to submit data to NDA (as opposed to just validating data). That being said, if you pass the -b flag it will trigger the logic in the code that prompts for the password & checks keyring, so you can use it as a temporary workaround until the issue you noted above is corrected. Just make sure to ctl-C and exit the program once it starts asking for the dataset title and description if you are not ready to actually submit data.

liningpan commented 1 year ago

I see. When can we expect this issue to be fixed?

gregmagdits commented 1 year ago

We did not have a specific date planned yet for the next release, but if this is causes users enough hassle, we could put one out this week or the following week.

gregmagdits commented 1 year ago

The fix for this has been deployed. NDA credentials do not need to be provided when validating. The -b flag does not need to be provided to avoid the bad-credentials error