Repository navigation
ROX-37613: recheck permissions for cached global metrics - #23442
Draft
parametalol wants to merge 1 commit into
Draft
parametalol wants to merge 1 commit into
parametalol wants to merge 1 commit into
Conversation
Global registries retain results across identities; datasource authorization alone cannot protect a subsequent scrape. Filter shared metric families per request using the affected tracker's required read permission, including platform-wide certificate expiry. Request: 'missing global tracker permission check is a bug, and needs to be addressed separately!' Follow-up: 'the fix for the cached global-metric permission checks needs its own Jira bug record ... use the Jira ID in the according branch name.' AI-assisted: code partially generated by AI.
|
Skipping CI for Draft Pull Request. |
Contributor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23442 +/- ##
==========================================
- Coverage 52.00% 51.97% -0.04%
==========================================
Files 2912 2912
Lines 183385 183415 +30
==========================================
- Hits 95377 95327 -50
- Misses 79680 79739 +59
- Partials 8328 8349 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
🚀 Build Images ReadyImages are ready for commit a08becf. To use with deploy scripts: export MAIN_IMAGE_TAG=5.1.x-278-ga08becf09e |
This branch has not been deployed
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.
Description
Global metric registries cache results across identities, so datastore authorization alone cannot protect later scrapes. Check the current caller's read permissions before gathering and filter cached global metric families per request. Certificate expiry metrics require Administration read access because their underlying service permits any authenticated user.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
go test ./central/metrics/custom -run 'TestRunner_(ServeHTTP|GlobalMetricsCheckCurrentPermissions)$' -count=1(passed).