-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[Fleet] Create new service account elastic/fleet-server-remote
for remote agent connections
#85747
Comments
Pinging @elastic/es-security (Team:Security) |
Hi, a couple of questions:
Is the Agent sending data, or the Fleet Server? Is there any compatibility constraint?
Does it mean that it will do in the future? |
Hi thanks for the quick reply!
Both, the fleet server is just an agent with the fleet server integration installed. When you say compatibility constraint do you mean between elastic agent versions and elasticsearch version? Not that I am aware of. (CC @ph )
I think that is the intention one day but I don't know the timeframe. Is it possible to expand the permissions of a service account in a future release? |
Yes, since they "belong" to different deployments. Let's assume that Fleet is a newer version, sending data to an older Elasticsearch cluster: could this cause any problem, for example if the permission set or schema changed between the two?
Yes it is, permissions can be redefined in newer versions. So the question is: which is the right tradeoff between security and simplicity? Do we really need a new service account? |
Thanks for this input, it's really useful. My answer to both questions is: let me talk to some people and get back to you on that :) |
I don't think we'll ever want A user who has In today's architecture, an RCE in Kibana would enable an attacker to read this token and use it to gain control of Agents being managed by the remote cluster. If we used a less privileged token, a vulnerability would only allow an attacker to ingest data into the integration data streams, but not the Fleet system indices. In the future, we intend for Kibana to not have any read access to Fleet-managed secrets, only write access. This would eliminate the potential for an RCE in Kibana to expose this token at all. A Fleet Server vulnerability could still expose it, however Fleet Server does have a much smaller API surface to defend. In general though, I think avoiding situations where this sensitive token could be used to gain access to control Agents on any cluster is valuable. Agents on the remote monitoring cluster are likely to be running on the same hosts as Elasticsearch of the main cluster which could be leveraged to further escalate privilege (say, by finding a way to reset the |
Thanks for the input Josh. Also regarding @bytebilly's point here:
Discussed this with @joshdover. If we were to introduce integration data in the future, we would stipulate that the remote cluster must have a minimum version for this to work, so we would be happy to proceed with a minimum set of privileges required for agent data for now. |
fyi @blakerouse I believe the original intent was to limit the permissions to the new remote cluster. |
Does that mean an agent (without fleet server integration) installed on an end-user's environment can also send data directly to Elasticsearch using the service token as the credential? Service accounts were designed to be used by services that can have "a few" instances. It was not intended to be used by a large number of agents (at least that's my understanding) for which API keys are more suitable. Could you please clarify the intended usage of this new service account on this aspect? |
@ywangd The The idea of the |
Hi @elastic/es-security team, we are picking this work up now, and would like to proceed with the creation of |
Why do users need to create a service token? In the prior discussion we said that fleet-server would use the service token, why do we need an API for users to create the token? The recommended model on Serverless would be for the controller to create a token and configure it in the fleet server, there shouldn't be any need to create a token via an API. |
We plan to ask users to create the service token because this is a remote cluster configuration: cluster 1 doesn't have access to create a service token in cluster 2 without user intervention. |
I don't think that's a viable model for Serverless, can we discuss offline? |
As discussed, we are going to defer on the serverless implementation now and focus on the stateful support. |
Description
Background
As part of elastic/kibana#104986 we will be adding the ability for Elastic Agents to send agent monitoring data to a remote Elasticsearch cluster. In order to achieve this, we will need a service token for the remote cluster which fleet server will use.
This service account will need less permissions than the
elastic/fleet-server
as integration data will not be sent to remote clusters yet.Service Account Details
Name:
elastic/fleet-server-remote
Permissions:
logs-*
,metrics-*
privileges "write", "create_index", "auto_configure"The text was updated successfully, but these errors were encountered: