Quantcast
Viewing all articles
Browse latest Browse all 50

Answer by mckenzm for Is "curl -u username:password http://example.com" secure?

Short answer is no... but....

If there are no server side options you can harden the security.

  1. If this is local intranet then isolate the broadcast domain, and donot use WiFi or any radio.
  2. As Shameer says, use a .netrc file, keep the values out of the code.
  3. If you trust that memory is safe, use environmental vars. $PSWD.
  4. If this is automation, run from root's crontab.
  5. ...in a container.
  6. ...from a VM with an encrypted disk.

None of these are any less secure than a browser using HTTP.


Viewing all articles
Browse latest Browse all 50

Trending Articles