-
Notifications
You must be signed in to change notification settings - Fork 81
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
fix audit unenroll #4036
fix audit unenroll #4036
Conversation
This pull request does not have a backport label. Could you fix it @juliaElastic? 🙏
|
|
I need confirmation on how this feature is supposed to work, read through the comments in elastic/elastic-agent#484 and the integration/e2e tests and it seems the feature is supposed to allow calling the audit unenroll API multiple times, and a checkin after. However, the existing unenroll action sets the active flag to false (and that is needed for the UI to correctly show unenrolled state), and by adding it to the audit unenroll API, the agent will no longer accept API calls (the API key will be invalidated). If we want this audit unenroll to be a "soft unenroll" and the agent to be able to come back online, we have to change the status calculation on the UI to show "unenrolled" if |
@@ -1485,17 +1485,6 @@ func Test_SmokeTest_AuditUnenroll(t *testing.T) { | |||
require.Equal(t, http.StatusOK, res.StatusCode) | |||
res.Body.Close() | |||
|
|||
t.Log("Orphaned can replace uninstall") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to test/support this scenario.
It's important for Endpoint to be able to signal that it is orphaned even if the installed agent is removed
In the original implementation I tried setting agents to inactive (#3818) however that would cause the API key authentication we do on checkins to fail. It would require a change in our overall auth logic if we wanted to make this change |
Closing this as it seems we can't move agents to inactive on audit unenroll as they wouldn't be able to check in again. |
What is the problem this PR solves?
// Please do not just reference an issue. Explain WHAT the problem this PR solves here.
audit unenroll should set the agent active flag to false
How does this PR solve the problem?
// Explain HOW you solved the problem in your code. It is possible that during PR reviews this changes and then this section should be updated.
How to test this PR locally
Design Checklist
Checklist
./changelog/fragments
using the changelog toolRelated issues
Closes elastic/kibana#197180