Git Product home page Git Product logo

Comments (6)

gandrille avatar gandrille commented on August 22, 2024

For the command line tools, of course.

from davix.

gbitzes avatar gbitzes commented on August 22, 2024

Hi,

I had a look at .netrc, it seems you can only specify a username and password in there. It would not be appropriate for davix, as it supports more authentication methods apart from simple username/password: x509 certificates, S3, Azure..

I think I will add ~/.davixrc, similar to .netrc in syntax but with support for the additional authentication methods. What do you think?

from davix.

adevress avatar adevress commented on August 22, 2024

Hi georgios,

If my opinion matter, It would be awesome to have both I think. netrc for compat and something like davixrc for exotic auth method.

Nowadays, a lot of service can now generate temporary service password which are safe to store in ~/.netrc.
I dont like clear text password more than you ~/.netrc is supported by almost all network tools including curl, wget, git and cadaver, that would be nice is davix support it too. :)

Cheers,
Adrien

from davix.

gbitzes avatar gbitzes commented on August 22, 2024

Sure, we could first check ~/.davixrc, and if no hosts in there match, then check ~/.netrc. Since the file format will be the same in both, no need to write two different parsers.

Some people have started using gpg-encrypted .netrc files.. :-)

from davix.

gandrille avatar gandrille commented on August 22, 2024

Hi All,
I fully agree with all of your comments.
Thanks a lot for listening to rfe!
Kind regards,
Etienne

from davix.

gbitzes avatar gbitzes commented on August 22, 2024

Hi,

The feature has been implemented and can be found in the devel branch. Please test, and try to break my terrible parser. :) Let me know especially in case it misbehaves with existing .netrc files. It always gives priority to .davixrc over .netrc.

  • It supports quoting of parameters, for example this will work: password "evil password with spaces"
  • You can escape quotes inside quotes, for example: password "super evil password with " quote"
  • Single quotes as well as double quotes are suppoted, you only need to escape the type of quote you're using, like in python. "valid' ", ' examples' ', 'of"', "quoted strings""
  • You can specify machine-specific as well as path-specific options, like git's implementation of netrc does. Example: settings under "machine host path /atlas" will apply only if your url's path starts with "/atlas". So you could specify per-VO certificates.
  • It understands the following directives: machine, default, path, login, password, cert, key, capath, s3accesskey, s3secretkey, s3region, s3alternate, s3token, azurekey. Did I forget anything?
  • macdef blocks are ignored.

Even though I usually prefer strict error checking, in this case any directives not understood are deliberately ignored, to minimize the risk of creating incompatibilities with other tools using their own custom directives.

Cheers

from davix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.