Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

ban local endpoints#41

Open
rnewson wants to merge 2 commits into
apache:masterfrom
cloudant:2980-ban-local-endpoints
Open

ban local endpoints#41
rnewson wants to merge 2 commits into
apache:masterfrom
cloudant:2980-ban-local-endpoints

Conversation

@rnewson

@rnewson rnewson commented Jun 9, 2016

Copy link
Copy Markdown
Member

Using "local" names in source and target yields unexpected behaviour (creating unsharded dbs which are also, by default, unreachable). This patch insists that "source" and "target" are http or https URL's.

COUCHDB-2980

@kxepal

kxepal commented Jun 9, 2016

Copy link
Copy Markdown
Member

+1 though I still don't understand how cluster doesn't knows about his own databases to reference them by simple name, not url.

@rnewson

rnewson commented Jun 9, 2016

Copy link
Copy Markdown
Member Author

it's ambiguous. "foo" is that a clustered database or a node-local database?

@kxepal

kxepal commented Jun 9, 2016

Copy link
Copy Markdown
Member

Oblivously, for cluster _replicator it's cluster database while for node _replicator it's local database (:

@rnewson

rnewson commented Jun 9, 2016

Copy link
Copy Markdown
Member Author

It might be possible to support this. I'll try.

@kxepal

kxepal commented Jun 9, 2016

Copy link
Copy Markdown
Member

That would be awesome if you could. In the end, that's one more point for backward compatibility (:

@rnewson

rnewson commented Jun 9, 2016

Copy link
Copy Markdown
Member Author

it's tricky. I think I could fix the ambiguity between cluster/not-cluster, but there's an authentication issue. we don't know who wrote the replicator doc. even if we did, we don't have their password. so we can't convert local to remote like we do for _replicate (which we can do because we have the authenticated Req object).

@rnewson

rnewson commented Jun 9, 2016

Copy link
Copy Markdown
Member Author

the best I can think of is to alter the document as it's being written, which will involve writing the user's password into the document on the fly, which seems like a really bad idea.

@kxepal

kxepal commented Jun 9, 2016

Copy link
Copy Markdown
Member

But if we inject userCtx based on who created document which we already support in order to let replicator access to local dbs?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants