Skip to content

Support for router forwarding requests to active coordinator/overlord#5369

Merged
jon-wei merged 4 commits intoapache:masterfrom
dclim:router-management-proxy
Feb 15, 2018
Merged

Support for router forwarding requests to active coordinator/overlord#5369
jon-wei merged 4 commits intoapache:masterfrom
dclim:router-management-proxy

Conversation

@dclim
Copy link
Copy Markdown
Contributor

@dclim dclim commented Feb 7, 2018

Allows the router to be configured to proxy requests to the active coordinator or overlord. This is different from the current inactive->active HTTP redirect behavior which has a number of shortcomings and does not work well with some deployment architectures.

The default behavior is for the management proxy to be disabled. See router.md for more information on the routing behavior.

Supports TLS and security. Authentication gets checked on the router (as well as destination), and authorization is checked on the destination (similar to how the query forwarding functions).

@dclim dclim closed this Feb 8, 2018
@dclim dclim reopened this Feb 8, 2018
@nishantmonu51
Copy link
Copy Markdown
Member

have not reviewed the code changes yet,
does this feature also allows users to proxy coordinator/overlord console UI too ?
Any plans to support that too if not already supported ?

@dclim
Copy link
Copy Markdown
Contributor Author

dclim commented Feb 9, 2018

@nishantmonu51 interesting, I didn't consider that and I'm fairly sure it won't work right now. We can consider adding support for this if it's a requested feature, but I think it makes sense to implement that in a different PR since it'll be pretty different from forwarding API calls (the router may need to serve the js/css/img resources files, it may need to rewrite the URLs in the HTML, etc.)

MODIFIED_PATH_ATTRIBUTE, request.getRequestURI().substring(ARBITRARY_OVERLORD_BASE_PATH.length())
);
} else {
handleBadRequest(response, "Unsupported proxy destination");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if the error message shows the wrong URI.

@jon-wei jon-wei merged commit 20a3164 into apache:master Feb 15, 2018
jon-wei pushed a commit to implydata/druid-public that referenced this pull request Feb 15, 2018
…apache#5369)

* allow router to forward requests to coordinator and overlord

* fix forbidden API

* more forbidden api fixes

* code review changes
@dclim dclim deleted the router-management-proxy branch March 12, 2018 21:44
gianm pushed a commit to implydata/druid-public that referenced this pull request Mar 12, 2018
…apache#5369)

* allow router to forward requests to coordinator and overlord

* fix forbidden API

* more forbidden api fixes

* code review changes
@dclim dclim added this to the 0.13.0 milestone Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants