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

Remove NETRC Usage #9

Closed
Ryanb58 opened this issue Jul 15, 2016 · 6 comments
Closed

Remove NETRC Usage #9

Ryanb58 opened this issue Jul 15, 2016 · 6 comments

Comments

@Ryanb58
Copy link
Contributor

Ryanb58 commented Jul 15, 2016

It appears that this client allows for us to pass in an NETRC file. NETRC is deprecated. Please remove this.

i.e.
https://github.com/smartfile/client-python/blame/04ff2ce406d98f3a299ab956c476ba27feae8956/smartfile/__init__.py#L135

@giampaolo
Copy link
Contributor

@btimby can this be removed?

@btimby
Copy link
Contributor

btimby commented Jul 15, 2016

It exists only because I use .netrc instead putting passwords onto command lines (those are globally viewable on your system via /proc and other means). It was included as a choice for users so they could (somewhat) securely store credentials.

At the end of the day, I don't really care that much, since the API is used as a library, they can select their own credential management.

@Ryanb58: DEPRECATED.

@btimby
Copy link
Contributor

btimby commented Jul 15, 2016

BTW, would love a link showing it is DEPRECATED. I come up blank.

@btimby
Copy link
Contributor

btimby commented Jul 15, 2016

Let me give a bit more information about .netrc.

.netrc is just a place to put network credentials. (Almost?) All unix network clients and many libraries support it. FTP is one (wget, curl, python-requests, rsync, blah, blah, blah). Think of using a python script in combination with wget against our API. Put your credentials in .netrc and both just work without having to expose the credentials vi /proc. You are right that .netrc is ancient, but AFAIK, .netrc is NOT deprecated and is very widely used. The netrc module imports fine in python3, no warnings etc. For me it is non-issue, the support of .netrc promotes good practice, but it was never mandatory and is ignored when not used (which is the common pattern, and maybe why you don't know about it).

For example, SSH supports a similar scheme for storing per-server credentials (SSH credentials are more complex than name/password pairs) in $HOME/.ssh/config. It is good practice to keep such things off the command line.

@btimby btimby changed the title Remove NETRC Useage Remove NETRC Usage Jul 15, 2016
@giampaolo
Copy link
Contributor

In this case I retract my previous statement. I assumed it was basically disappeared but I had no idea it had so many use cases (I may start using it actually).

@btimby
Copy link
Contributor

btimby commented Jul 15, 2016

You should :-).

@Ryanb58 Ryanb58 closed this as completed May 31, 2018
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

No branches or pull requests

3 participants