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

Client Certificate is no longer being sent on proxied requests #22643

Closed
mikn opened this issue Sep 4, 2018 · 11 comments
Closed

Client Certificate is no longer being sent on proxied requests #22643

mikn opened this issue Sep 4, 2018 · 11 comments
Labels
Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@mikn
Copy link

mikn commented Sep 4, 2018

Kibana version: 6.4.0

Elasticsearch version: 6.4.0

Server OS version: alpine 3.8

You know one of those things that you fix because you think it is a bug, but it turns out that you have users that use it as a feature?
Well, this would be the one for me 😄 PR: #17804
We are currently using Searchguard to protect our ES cluster and the connection between ES and Kibana is authenticated using a client certificate issued specifically to the Kibana server.
To authorize the user, we have set up an oauth2_proxy in front of Kibana and we forward the headers from the oauth2_proxy to Kibana, which then forwards it to ES and thus the user is thus individually authorized.

Is there any possibility for this to end up going back into Kibana? This currently means we cannot upgrade to Kibana 6.4 without redoing our authc/authz scheme.

@kobelb kobelb added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Sep 4, 2018
@kobelb
Copy link
Contributor

kobelb commented Sep 4, 2018

Hey @mikn, we removed this behavior because sending the certificates and the headers for proxied requests requires Elasticsearch to be configured in a specific manner to ensure that the proper user is authenticated. If the certificates are meant to identify the Kibana server user, and the headers are used to identify the logged in end-user, if we set both for the proxied requests then Elasticsearch must be configured in a specific way to ensure that the headers are used, and we don't fallback to using the certificates for authentication or else we risk authenticating as the Kibana server user for proxied requests.

I'm not too familiar with the way that this works with SearchGuard, it might be worth checking with them to see what they recommend.

@mikn
Copy link
Author

mikn commented Sep 6, 2018 via email

@kobelb
Copy link
Contributor

kobelb commented Sep 6, 2018

@mikn you're correct that with these changes, it's no longer possible to require transport authentication for all connections that are established to Elasticsearch as the proxied requests for end-users won't be presenting the client certificates. This is because we can't authenticate all requests to Elasticsearch using certificates, because in the case of these proxied requests, we don't have the actual end-user's certificate because of the way that TLS works.

Because of the nature of our setup (we run Kibana and ES inside a Kubernetes cluster, so volatile IP addresses), we cannot set a trusted proxy IP address (required for header-only authentication)

I'm not too familiar with SearchGuard, but it appears that they support regular expressions for the internalProxies, is it possible to take advantage of this facility for your use-case?

@mikn
Copy link
Author

mikn commented Sep 6, 2018 via email

@mikn
Copy link
Author

mikn commented Sep 11, 2018

Is there any possibility of an update on this? A decision either way would help us move forward with this issue. :)

@kobelb
Copy link
Contributor

kobelb commented Sep 11, 2018

@mikn given my understanding of the impact of this change, I don't think it's sufficient to justify us rolling back this change in behavior. I'd like to keep this issue open for the time being to collect additional input from the community to determine what other use-cases are impacted by this change.

@hs750
Copy link

hs750 commented Sep 26, 2018

This is also an issue when using a reverse proxy (such as NGINX) to secure/authenticate communication with elasticsearch. In our use case we use mutual authentication between clients (including kibana) and nginx. Because the certificates are no longer sent, nginx now rejects the requests made from kibana.

The lack of documentation about this issue is noted in #18504.

@LukeCross
Copy link

I am also experiencing this issue trying to integrate both Searchguard and an Nginx reverse proxy with Elasticsearch 6.4.1 and Kibana 6.4.1. The issue being that using client certificate authentication and Kibana 6.4.1, as the certificates are not sent with every request, both Nginx and Searchguard both reject the requests.

@maglo
Copy link

maglo commented Oct 2, 2018

I have seen the same problem. We are using an Auth-scheme where we take care of authenticating requests to Kibana. We then use a client certificate to secure the connection from Kibana to Elasticsearch by way of using a reverse proxy.

We cannot upgrade to 6.4 without redoing our auth scheme.

Consider making it an option to use the certificates even for proxied requests.

@anthonyhaussman
Copy link

The same problem via a reverse proxy configures with Nginx.
It is difficult fo to upgrade Kibana without this feature.

To add the option would be great (even if it's disabled by default).

@kobelb
Copy link
Contributor

kobelb commented Oct 19, 2018

Thanks everyone for providing your use-cases, I think we have sufficient support and reasoning for adding back in this functionality behind a configuration flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests

6 participants