fix: invalidating API Keys against ES master#4587
Merged
simitt merged 1 commit intoelastic:masterfrom Dec 24, 2020
Merged
Conversation
The ES InvalidateApiKey API does not support param ID anymore. Switch to using IDs instead. Related elastic/elasticsearch#66671
Codecov Report
@@ Coverage Diff @@
## master #4587 +/- ##
==========================================
+ Coverage 75.96% 75.98% +0.02%
==========================================
Files 161 161
Lines 9789 9789
==========================================
+ Hits 7436 7438 +2
+ Misses 2353 2351 -2
|
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Steps errors
Expand to view the steps failures
|
Contributor
Author
|
Merging this in to fix tests. @elastic/apm-server let me know in case you are not happy with the solution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation/summary
The ES InvalidateApiKey API does not support param
idanymore. Switch to usingidsinstead.Related elastic/elasticsearch#66671
Do NOT backport this to
7.xas ES only introduced theidsparameter in7.10.Ideally we would derive the used Elasticsearch version and adapt the parameter accordingly. There exists already an issue to ensure ES client 8.0 can work with 7.x ES, which would be a bigger change and needs more discussion how to tackle this. For now this fixes functionality and system tests in master.
Checklist
- [ ] Update CHANGELOG.asciidoc- [ ] Documentation has been updatedHow to test these changes
apm-server apikey invalidate --id "123"cmd against an>=7.10or8.0ES -> expected to workapm-server apikey invalidate --id "123"cmd against an<7.10ES -> expected to throw an errorRelated issues