{"action":"created","issue":{"url":"https://api.github.com/repos/calvinmetcalf/crypto-pouch/issues/54","repository_url":"https://api.github.com/repos/calvinmetcalf/crypto-pouch","labels_url":"https://api.github.com/repos/calvinmetcalf/crypto-pouch/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/calvinmetcalf/crypto-pouch/issues/54/comments","events_url":"https://api.github.com/repos/calvinmetcalf/crypto-pouch/issues/54/events","html_url":"https://github.com/calvinmetcalf/crypto-pouch/issues/54","id":219703673,"number":54,"title":"Remote CouchDB is not encrypted","user":{"login":"vardas-bill","id":9137597,"avatar_url":"https://avatars0.githubusercontent.com/u/9137597?v=3","gravatar_id":"","url":"https://api.github.com/users/vardas-bill","html_url":"https://github.com/vardas-bill","followers_url":"https://api.github.com/users/vardas-bill/followers","following_url":"https://api.github.com/users/vardas-bill/following{/other_user}","gists_url":"https://api.github.com/users/vardas-bill/gists{/gist_id}","starred_url":"https://api.github.com/users/vardas-bill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vardas-bill/subscriptions","organizations_url":"https://api.github.com/users/vardas-bill/orgs","repos_url":"https://api.github.com/users/vardas-bill/repos","events_url":"https://api.github.com/users/vardas-bill/events{/privacy}","received_events_url":"https://api.github.com/users/vardas-bill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-05T20:22:43Z","updated_at":"2017-04-06T11:34:47Z","closed_at":null,"body":"When using crypto-pouch in an ionic 2 App and replicating to a remote CouchDB database the CouchDB documents are not encypted.\r\n\r\nThe code I am using looks like this:\r\n\r\n`  init(localDBName, remoteDBName)\r\n  {\r\n    this._DB = new PouchDB(localDBName);\r\n\r\n    PouchDB.plugin(CryptoPouch);\r\n    this._DB.crypto('a password');\r\n\r\n    this.remote = remoteDBName;    \r\n\r\n    console.log('Data: init(): PouchDB database opened for localDBName = ' + localDBName + ' : ' + this._DB + ', remoteDBName = ' + this.remote);\r\n\r\n    // Insert the url for the CouchDB server into the remoteDBName \r\n    var realRemoteDB = this.remote.replace(\"localhost:5984\", COUCHDB_SERVER_URL);\r\n\r\n    console.log('Data: init(): remoteDB path being used is: ' + realRemoteDB);\r\n\r\n\r\n    this._remoteDB = new PouchDB(realRemoteDB);\r\n    this._remoteDB.crypto('a password');\r\n\r\n\r\n    let options = {\r\n      live: true,\r\n      retry: true,\r\n      continuous: true\r\n    };\r\n\r\n    return this._DB.sync(realRemoteDB) //No options here -> One time sync\r\n      .on('complete', (info) => {\r\n        console.log('Data: init(): first one time sync has completed about to do live syncing now');\r\n        this.events.publish('SYNC_FINISHED', true); // Let login know we have synced the data\r\n        return this._DB.sync(realRemoteDB, options) //Continous sync with options\r\n          .on('complete', (info) => {\r\n            console.log('***** DATA: init() Complete: Handling syncing complete');\r\n            console.dir(info);\r\n          })\r\n          .on('change', (info) => {\r\n            console.log('***** DATA: init() Change: Handling syncing change');\r\n            console.dir(info);\r\n          })\r\n          .on('paused', (info) => {\r\n            console.log('***** DATA: init() Paused: Handling syncing pause');\r\n            console.dir(info);\r\n          })\r\n          .on('active', (info) => {\r\n            console.log('***** DATA: init() Active: Handling syncing resumption');\r\n            console.dir(info);\r\n          })\r\n          .on('error', (err) => {\r\n            console.log('***** DATA: init() Error: Handling syncing error');\r\n            console.dir(err);\r\n          })\r\n          .on('denied', (err) => {\r\n            console.log('***** DATA: init() Denied: Handling syncing denied');\r\n            console.dir(err);\r\n          });\r\n      });\r\n  }`"},"comment":{"url":"https://api.github.com/repos/calvinmetcalf/crypto-pouch/issues/comments/292146611","html_url":"https://github.com/calvinmetcalf/crypto-pouch/issues/54#issuecomment-292146611","issue_url":"https://api.github.com/repos/calvinmetcalf/crypto-pouch/issues/54","id":292146611,"user":{"login":"calvinmetcalf","id":1128607,"avatar_url":"https://avatars3.githubusercontent.com/u/1128607?v=3","gravatar_id":"","url":"https://api.github.com/users/calvinmetcalf","html_url":"https://github.com/calvinmetcalf","followers_url":"https://api.github.com/users/calvinmetcalf/followers","following_url":"https://api.github.com/users/calvinmetcalf/following{/other_user}","gists_url":"https://api.github.com/users/calvinmetcalf/gists{/gist_id}","starred_url":"https://api.github.com/users/calvinmetcalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvinmetcalf/subscriptions","organizations_url":"https://api.github.com/users/calvinmetcalf/orgs","repos_url":"https://api.github.com/users/calvinmetcalf/repos","events_url":"https://api.github.com/users/calvinmetcalf/events{/privacy}","received_events_url":"https://api.github.com/users/calvinmetcalf/received_events","type":"User","site_admin":false},"created_at":"2017-04-06T11:34:47Z","updated_at":"2017-04-06T11:34:47Z","body":"I can take a deeper look today, what versions of everything are you using?\n\nOn Thu, Apr 6, 2017, 5:04 AM Bill Noble <notifications@github.com> wrote:\n\n> Hi Calvin,\n>\n>\n>\n> Is there anything you can suggest? Should I hunt for the bug in the\n> transform pouch code and if so can you point me in the right direction?\n>\n>\n>\n> Very Best\n>\n> Bill\n>\n>\n>\n> From: Calvin Metcalf <notifications@github.com>\n> Reply-To: calvinmetcalf/crypto-pouch <reply@reply.github.com>\n> Date: Wednesday, 5 April 2017 at 23:23\n> To: calvinmetcalf/crypto-pouch <crypto-pouch@noreply.github.com>\n> Cc: Bill Noble <bill.noble@vardas.com>, Author <author@noreply.github.com>\n> Subject: Re: [calvinmetcalf/crypto-pouch] Remote CouchDB is not encrypted\n> (#54)\n>\n>\n>\n> likely an issue with transform pouch which this is based on\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n>\n> —\n> You are receiving this because you commented.\n>\n>\n> Reply to this email directly, view it on GitHub\n> <https://github.com/calvinmetcalf/crypto-pouch/issues/54#issuecomment-292113173>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABE4ny5gSpewFzKceUjoMn9hFPeS85Eyks5rtKp_gaJpZM4M0w0i>\n> .\n>\n"}}
{"actor":{"display_login":"calvinmetcalf"}}