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

APM Server: Fix secret token config for APM Server 8.0+ #6769

Merged
merged 5 commits into from
May 9, 2023

Conversation

pebrc
Copy link
Collaborator

@pebrc pebrc commented May 8, 2023

Fixes #6768

To discuss: whether we should change the e2e tests to check the case where a client tries to use an incorrect auth token to make a requests (which should be rejected). This would also IUC test for correct configuration of the APM server with a auth token. Because we did not do this check we missed the misconfiguration since 8.0 in our e2e testing.

Marking this as breaking because we shipped versions of ECK that misconfigured 8.0+ APM servers and therefore there might be user installations out there that work only because of this misconfiguration. If we now ship the fix and their clients are not actually setting an auth token then APM server will start rejecting their requests.

@pebrc pebrc added the v2.8.0 label May 8, 2023
@botelastic botelastic bot added the triage label May 8, 2023
@pebrc pebrc added >bug Something isn't working >breaking and removed triage labels May 8, 2023
@pebrc
Copy link
Collaborator Author

pebrc commented May 8, 2023

buildkite test this -f p=gke,E2E_TAGS=apm -m s=8.7.0,s=7.17.10

@pebrc
Copy link
Collaborator Author

pebrc commented May 8, 2023

buildkite test this -f p=gke,E2E_TAGS=apm -m s=8.7.0,s=7.17.10

@pebrc
Copy link
Collaborator Author

pebrc commented May 9, 2023

I think there is a problem with the recent changes to securityContexts not dropping capabilities on older versions of Elasticsearch and the e2e test checks not accounting for that. Will need to figure out why this is not being flagged up in the nightlies (maybe it is but burrowed under other failures)

@barkbay
Copy link
Contributor

barkbay commented May 9, 2023

{"Time":"2023-05-08T19:20:13.711514403Z","Action":"output","Package":"github.com/elastic/cloud-on-k8s/v2/test/e2e/apm","Test":"TestCrossNSAssociation/Elasticsearch_containers_SecurityContext_should_be_set","Output":"    --- FAIL: TestCrossNSAssociation/Elasticsearch_containers_SecurityContext_should_be_set (0.00s)\n"}

Should be fixed by #6772

@pebrc
Copy link
Collaborator Author

pebrc commented May 9, 2023

buildkite test this -f p=gke,E2E_TAGS=apm -m s=8.7.0,s=7.17.10

Copy link
Contributor

@barkbay barkbay left a comment

Choose a reason for hiding this comment

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

LGTM

@pebrc pebrc merged commit 49e905e into elastic:main May 9, 2023
pebrc added a commit to pebrc/cloud-on-k8s that referenced this pull request May 9, 2023
Also changes the e2e tests to check the case where a client tries to use an incorrect auth token to make a requests (which should be rejected). This acts as a test for correct configuration of the APM server with a auth token. Because we did not do this check we missed the misconfiguration since 8.0 in our e2e testing.

Marking this as breaking because we shipped versions of ECK that misconfigured 8.0+ APM servers and therefore there might be user installations out there that work only because of this misconfiguration. If we now ship the fix and their clients are not actually setting an auth token then APM server will start rejecting their requests.

(cherry picked from commit 49e905e)
@pebrc
Copy link
Collaborator Author

pebrc commented May 9, 2023

💚 All backports created successfully

Status Branch Result
2.8

Questions ?

Please refer to the Backport tool documentation

barkbay pushed a commit that referenced this pull request May 10, 2023
Also changes the e2e tests to check the case where a client tries to use an incorrect auth token to make a requests (which should be rejected). This acts as a test for correct configuration of the APM server with a auth token. Because we did not do this check we missed the misconfiguration since 8.0 in our e2e testing.

Marking this as breaking because we shipped versions of ECK that misconfigured 8.0+ APM servers and therefore there might be user installations out there that work only because of this misconfiguration. If we now ship the fix and their clients are not actually setting an auth token then APM server will start rejecting their requests.

(cherry picked from commit 49e905e)
@barkbay barkbay changed the title Fix incorrect auth secret_token key post 8.0 APM Server: fix secret token config for APM Server 8.0+ May 10, 2023
@barkbay barkbay changed the title APM Server: fix secret token config for APM Server 8.0+ APM Server: Fix secret token config for APM Server 8.0+ May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking >bug Something isn't working v2.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ApmServer secret token config is invalid for APM Server 8.0+
2 participants