couchdb-bootstrap icon indicating copy to clipboard operation
couchdb-bootstrap copied to clipboard

Secured server

Open Apcio opened this issue 10 years ago • 2 comments

Hello. How can I safety use bootstrap on secured servers (server admins, db admins, users) ? I can pass to URL http://login:pas@domain but I don't think, this is a good idea ?

In CLI and Node.js ?

Apcio avatar Aug 27 '15 12:08 Apcio

Currently only auth urls are supported for the CLI.

For api usage you can pass in everything nano acceps. Here you can pass requestDefaults with an auth object.

For example:

bootstrap({
  url: 'https://couch.example.com',
  requestDefaults: {
    auth: {
      user: 'bob',
      pass: 'secure'
    }
  }
}, 'path/to/fs', cb)

jo avatar Sep 01 '15 10:09 jo

I couldn't get this to work (#28), but a basic auth URL (e.g. http://admin:admin@localhost:5984) worked fine in both the CLI and API.

tlvince avatar Oct 29 '15 13:10 tlvince