-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] proxy implementation #36907
[feat] proxy implementation #36907
Conversation
Pinging @elastic/kibana-platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably this PR is not finished yet, so I stop commenting 😅
2657123
to
2c7563f
Compare
@restrry @dover @spacedragon this is ready for a final review. i'm starting to write tests for it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless you plan to do it later, otherwise I think last week we agree on implement based on optimistic concurrent control, which means we need to take version
query parameter to the request and properly handle it if the update fail
db7a87b
to
7bd4d7c
Compare
33922df
to
603889e
Compare
💔 Build Failed |
💔 Build Failed |
Closing this for now |
Summary
This is an x-pack plugin to implement a request proxy system for kibana.
This allows parts of kibana to register as the responsible instance for a certain
resource and then allow other kibana instances to discover this information
and proxy requests for that resource back to the responsible instance.
This initial implementation is based around the needs for the code plugin, but
the idea is make this generic enough for use in other parts of the system.
There are a few pending issues:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportThis was checked for keyboard-only and screenreader accessibilityFor maintainers
DevDoc
This PR implements an internal proxy mechanism for a collection of Kibana nodes living behind the same load balancer, with a shared mapping for resources stored in the backing Elasticsearch store.
The proxy allows a plugin developer to register resources with specific nodes, and then forward requests for those resources to the responsible nodes, so that the data may be returned to the user requesting it.
The end-user must provide SSL certificates and keys for the server and client to communicate via Mutual TLS authorization, securing any internal data from easily leaking out. If the SSL certificates are self-signed, the signing certificate authority will also need to be provided. Information on generating the keys, certificates and authorities may be found in the Elasticsearch encrypted communications guide. The proxy will throw an error on start if the TLS configuration has not been provided.
This introduces several new configuration options under the
xpack.proxy
path:updateInterval
- the frequency (in ms) that the nodes should verify their availabilitytimeoutThreshold
- the maximum length of time (in ms) that a node can go without checking inport
- the port number that the proxy server should be listening onmaxRetry
- the number of times the proxy should attempt to request the remote resource before giving uprequestBackoff
- how long the proxy should wait before re-requesting an unavailable resourceThe following configuration options are the same as from
server.ssl
:cert
- the TLS certificate to usekey
- the key for this TLS certificateca
- the certificate authority used to generate this certificatecipherSuites
- the cipher suites to usesupportedProtocols
- the protocols supported by the proxyWhen instantiated,
proxy.setup()
returns:And
proxy.start()
returns: