-
Notifications
You must be signed in to change notification settings - Fork 4.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
[Ingest Manager] Improve agent unenrollment #18825
Comments
Pinging @elastic/ingest-management (Team:Ingest Management) |
I'm posting this here and in elastic/kibana#67704 -
from api/ingest_manager/fleet/agents?page=1&perPage=20&showInactive=true
Also, do we ever intend to show users the list of inactive Agents in the UI? It may certainly be useful, not sure that I saw tickets for that for Beta 1 or beyond, but I assume we have to... @mostlyjason yes? |
Same concern for when we revoke an enrollment API key - I don't think that was tracked either, it may be an even bigger concern for that API + use case. |
Sorry I missed this one earlier @EricDavisX. yes I think we show the inactive ones in the UI. They are hidden by default but there is a filter to show them. |
@nchaulet Can you confirm the behavior in #18825 (comment) and #18825 (comment) |
When an user click on unenroll we save on the agent the property |
@nchaulet If the Agent unenroll but never confirm we still invalidate the key? |
No if the agent never confirm, you will need to be manually force unenroll (currently only available with an API call, but can expose this in the UI for agent that are currently unenrolling see the implemation PR elastic/kibana#70031) |
I think we should expose like a Example is I enroll the agent, then I enroll the same agent again. Now I have 2 in the list, 1 online and 1 offline. If I unenroll the first enrollment it will sit in I think this will also be the case in the real world not just development. In the case of the Windows world, users my just reboot the machine press F5, boot from Windows Deployment Services and deploy a fresh clean image. If that fresh clean image has a post install step of enrolling the Elastic Agent, it will show as a new machine in Fleet. But the previous installation of the machine will remain |
@hbharding what do you think of having a |
@nchaulet I think we need to solve it in two steps:
We need to make sure the APIs keys are invalidated when unenroll is executed. |
I discussed this with @ruflin and we agreed that the timeout is more complex to implement as it needs background task, and in a first step for beta1 the timeout could be a manual action via an API call, or what I propose in the UI. I think the case where the agent do not unenroll correctly by itself is an error and I think it's ok to require an action to correct it (force unenroll) |
@nchaulet OK, lets do the following:
I think we close this issue after 1 |
Description
Related to elastic/kibana#67409
We need to improve the way we unenroll agent.
Currently it's done by revoking all API keys used by the agent, and the agent guess that it should unenroll if he start receiving 401.
We can to improve this to support:
The text was updated successfully, but these errors were encountered: