jo / couchdb-bootstrap

Bootstrap CouchDB projects: configure, setup security, deploy ddocs and create users.
Other
115 stars 13 forks source link

Secured server #14

Open Apcio opened 9 years ago

Apcio commented 9 years ago

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 ?

jo commented 9 years ago

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)
tlvince commented 8 years ago

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.