-
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
[Beats Management] APIs #18858
Comments
I think permissions in If we are going for short-lived one-time tokens we don't need verification, wdyt? |
Yes, you're right @exekias. Fixed. Thanks! |
@exekias I've expanded the scope of this issue beyond just Enrollment APIs to include Management APIs, persistence, and security since these concerns are all related. Specifically, I've updated the issue description with the following:
Please review all of the above and let me know if it makes sense to you. |
This is looking good! A few notes:
I noticed |
So the reason I thought we should do this is to avoid this attack scenario:
But it's possible I'm misunderstanding something in the flow so I'm happy to be corrected and simplify the design!
Not the beat's info like its IP or public key; those we can delete. Only keep its identity (UUID) + tag associations, effectively keeping around any configuration the user has made for the Beat. Otherwise a user will have to redo all the configuration for that Beat from scratch once the Beat is re-enrolled. Of course, if the same Beat presents a different UUID when it re-enrolls, that's a different story. But here I'm thinking of the case where a Beat has to be disenrolled + reenrolled due to security reasons.
Yeah, its a convention in Kibana to separate all the different Kibana plugins' APIs from each other and avoid collisions in naming. The convention is to start the URL with |
Thanks for the explanations. I agree with the security concerns, problem is that we cannot consider the enrollment token safe, as it may be leaked. Let's give this a second thought, worst case scenario we need to rely on SSL security to trust the Kibana instance. |
I looked at what APM does, and this is indeed what they recommend in their docs: https://www.elastic.co/guide/en/apm/server/6.2/security.html#secret-token At this point, in order to move forward for an MVP, I think we should keep things simple. Concretely, I think we should go back to your original proposal of enrollment tokens and access tokens being issued (and later verified) by Kibana and recommend in our docs that the user must enable SSL/TLS on their Kibana server. WDYT? |
Works for me 👍 |
closing this issue, current CM implementation has diverged. |
Each Beat should be able to enroll itself with Kibana before users can start centrally managing that beat's configuration from within Kibana. For this purpose, Beats will need a set of enrollment Kibana APIs they can call.
Here is what the enrollment sequence involving a Beat user, a Beat, Kibana, and an administrative user will look like:
Once enrolled, a user (with appropriate security privileges) should be able to sign-in to the Kibana UI and centrally-manage enrolled Beats and their configurations.
The following HTTP APIs should exist in order to enable the aforementioned enrollment and central management operations:
POST /api/beats/enrollment_tokens
beats_admin
rolePOST /api/beats/agent/{beat UUID}
GET /api/beats/agents
beats_admin
rolePOST /api/beats/agents/verify
beats_admin
roleDELETE /api/beats/agents
beats_admin
rolePUT /api/beats/agent/{beat UUID}
PUT /api/beats/tag/{tag}
beats_admin
rolePOST /api/beats/agents_tags/assignments
beats_admin
rolePOST /api/beats/agents_tags/removals
beats_admin
roleGET /api/beats/tags
beats_admin
roleGET /api/beats/tag/{tag}
beats_admin
roleDELETE /api/beats/tags
beats_admin
roleGET /api/beats/agent/{beat UUID}/configuration
GET /api/beats/agent/{beat UUID}
beats_admin
rolePersistence
The APIs will use an internal Elasticsearch indices for persistence. These indices should come into existence via an index template that is loaded up before any of the above APIs become available for use. PR #19072 (merged).
Security
Also, we should provide a built-in X-Pack Security role,
beats_admin
, that will provide total access to persisted data. elastic/elasticsearch#30520.The text was updated successfully, but these errors were encountered: