Skip to content

Add Unprivileged state reporting to user-agent, refactor User-Agent setup process #40034

Merged
fearful-symmetry merged 8 commits intoelastic:mainfrom
fearful-symmetry:user-agent-privilege-mode
Jul 1, 2024
Merged

Add Unprivileged state reporting to user-agent, refactor User-Agent setup process #40034
fearful-symmetry merged 8 commits intoelastic:mainfrom
fearful-symmetry:user-agent-privilege-mode

Conversation

@fearful-symmetry
Copy link
Copy Markdown
Contributor

@fearful-symmetry fearful-symmetry commented Jun 26, 2024

Proposed commit message

Hopefully the final part of closes elastic/elastic-agent#4683

There's a few things going on here:

  • This refactors the way we report config state in the User-Agent, we now put them in the comment field, like so: Elastic-testbeat/8.15.0 (linux; amd64; unknown; 0001-01-01 00:00:00 +0000 UTC; Standalone; Unprivileged)
  • This refactors the User-Agent construction process, taking it out of the ES startup and placing it in the beat startup. This centralizes the logic, since nothing in the elasticsearch output constructor needs to actually care about how the User-Agent field is built
  • Adds IsUnprivileged() to the User-Agent data
  • Adds tests

Checklist

  • 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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

@fearful-symmetry fearful-symmetry requested review from a team as code owners June 26, 2024 16:23
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 26, 2024
@fearful-symmetry fearful-symmetry changed the title Add Unprivileged state reporting to use agent, refactor User-Agent setup process Add Unprivileged state reporting to user-agent, refactor User-Agent setup process Jun 26, 2024
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jun 26, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @fearful-symmetry? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@fearful-symmetry fearful-symmetry added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Jun 26, 2024
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 26, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@fearful-symmetry fearful-symmetry merged commit cb09004 into elastic:main Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report whether an agent is Fleet managed or standalone or unprivileged to components

3 participants