Skip to content

[8.19] (backport #9623) Fix/8544 windows unprivileged reenroll#9793

Merged
kaanyalti merged 1 commit into
8.19from
mergify/bp/8.19/pr-9623
Sep 10, 2025
Merged

[8.19] (backport #9623) Fix/8544 windows unprivileged reenroll#9793
kaanyalti merged 1 commit into
8.19from
mergify/bp/8.19/pr-9623

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Sep 8, 2025

  • Bug

What does this PR do?

Updates the enroll command so that the file permissions are fixed when a privileged user executes enroll. Implemented only for windows. Permission fix is executed every time root executes enroll and enroll is not triggered by install.

Why is it important?

Currently

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

None

How to test this PR locally

  • Build the agent
  • Install and enroll with --unprivileged flag
  • Execute enroll as root
  • Verify that agent is still healthy

Related issues


This is an automatic backport of pull request #9623 done by [Mergify](https://mergify.com).

* fix(8544): implemented windows getOwnerFromPath

* fix(8544): refactored windows getFileOwnerFromPath to be more testable, added tests

fix(8544): fix build tag

* fix(8544): removed windows check from enroll

* fix(8544): removed os config from reenroll test, and removed unused struct

* fix(8544): update re-enroll tests

* fis(8544): added chengelog fragment

* fix(8544): ran mage check

* fix(8544): fix windows tests

(cherry picked from commit 113e6ad)
@mergify mergify Bot requested a review from a team as a code owner September 8, 2025 13:49
@mergify mergify Bot added the backport label Sep 8, 2025
@mergify mergify Bot requested review from pchila and ycombinator and removed request for a team September 8, 2025 13:49
@mergify mergify Bot mentioned this pull request Sep 8, 2025
6 tasks
@github-actions github-actions Bot added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Sep 8, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@elastic-sonarqube
Copy link
Copy Markdown

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

cc @kaanyalti

@kaanyalti kaanyalti merged commit 9a05132 into 8.19 Sep 10, 2025
21 checks passed
@kaanyalti kaanyalti deleted the mergify/bp/8.19/pr-9623 branch September 10, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants