Skip to content
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

Add kibana client API wrappers for tamper protection E2E support #141

Merged

Conversation

aleksmaus
Copy link
Member

What does this PR do?

Add kibana client API wrappers for tamper protection E2E support

  • Added is_protected property to AgentPolicyUpdateRequest. This allows to enabled and disabled tamper protection through the policy update Kibana API
  • Added GetPolicyUninstallTokens, that allows to to fetch uninstall tokens for tamper protected policy.
  • Added DeleteFleetPackage. Is needed for testing of Endpoint tamper protection E2E.
  • Moved InstallFleetPackage from https://github.com/elastic/elastic-agent/blob/main/pkg/testing/tools/fleet_package_policy_api.go#L66. Addresses that TODO item.
  • Expanded integration tests for the newly introduced API.
    Was not sure if the current integration tests are ran in CI, but it was convenient to have some coverage and tests the APIs.

Why is it important?

These new additions are needed for Agent/Endpoint tamper protection E2E tests.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.md

@aleksmaus aleksmaus requested a review from a team as a code owner July 31, 2023 20:50
@aleksmaus aleksmaus requested review from belimawr and removed request for a team July 31, 2023 20:50
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 31, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-08-01T16:24:20.373+0000

  • Duration: 10 min 56 sec

Test stats 🧪

Test Results
Failed 0
Passed 791
Skipped 13
Total 804

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History


// https://www.elastic.co/guide/en/fleet/8.8/fleet-apis.html#createPackagePolicy
// request https://www.elastic.co/guide/en/fleet/8.8/fleet-apis.html#package_policy_request
type PackagePolicyRequest struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, saw the "TODO" there and addressed along with other new additions that were needed for agent tampering test cases. Will pull these from the library once it merges and update agent E2E tests.

@aleksmaus aleksmaus merged commit 81cae6b into elastic:main Aug 7, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants