Skip to content
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

Add configuration for serverBasePath and serverRequestHeader #34

Closed
anmoel opened this issue Oct 21, 2022 · 5 comments · Fixed by #35
Closed

Add configuration for serverBasePath and serverRequestHeader #34

anmoel opened this issue Oct 21, 2022 · 5 comments · Fixed by #35

Comments

@anmoel
Copy link
Contributor

anmoel commented Oct 21, 2022

Hi,

we split our frontend- and backend-systems and we want to host the elastalert2 server behind an api-gateway.
This api-gateway hosts many APIs so we need a basePath option for selecting the elastalert server.
Additional we must add custom headers on each request, so we can authenticate against our api-gateway.

i will prepare a pull-request for both.

regards
André

@Karql
Copy link
Owner

Karql commented Oct 21, 2022

Hi,

Why do you want to expose elastalert2-server with an api-gateway?
Only for elastalert-kibana-plugin or do you have another use case?

If only for plugin imo there is no such need.

Plugin does not make requests directly to elastalert2-server but first make request to kibana and kibana proxied it to elastalert2-server.

IMO you should expose only kibana and keep elasticsearch and elastalert2-server internally.

elastic-stack

This approach is more secure.

Best regards,
Mateusz

@anmoel
Copy link
Contributor Author

anmoel commented Oct 21, 2022

hi @Karql ,

kibana is an frontend application and not behind the api-gateway. The api-gateway only support REST calls.
so the api-gateway is between the kibana server and the elastalert2-server / elasticsearch server

@Karql
Copy link
Owner

Karql commented Oct 21, 2022

Is there something in front of kibana like reverse-proxy?

I don't see any reason why kibana it could not be behind api-gateway.

elastic-stack2

@anmoel
Copy link
Contributor Author

anmoel commented Oct 21, 2022

the api gateway only supports REST conform APIs and not all HTTP requests. sessions and other http features are not supported
Additional Kibana should not reachable for all Users like this page

Kibana

I implemented both optional parameters in PR #35.

@Karql Karql closed this as completed in #35 Oct 24, 2022
@Karql
Copy link
Owner

Karql commented Oct 24, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants