-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Deprecate REST access to System Indices #60945
Merged
+2,605
−983
Merged
Changes from 1 commit
Commits
Show all changes
195 commits
Select commit
Hold shift + click to select a range
a1ffb91
first cut of header-based system index enforcement
gwbrown 4712c47
Properly shut down components in test
gwbrown 6793e2e
Version guard system index flag on cleanup
gwbrown 98cad26
Fix guard in REST layer
gwbrown 3fe1011
Set origin from Enrich
gwbrown 1c67a6f
Set origin from Enrich in the processor
gwbrown 57b8c03
Fix NPEs in Enrich tests
gwbrown fc85715
Ensure we never double-add the header (should be tests only?)
gwbrown d782a40
Fix NPE in UsageServiceTests
gwbrown b437ad6
Fix NPE in RestAnalyzeActionTests
gwbrown d0c1a8f
Fix NPE in RestBulkActionTests
gwbrown ebaafcf
Fix NPE/mocking in `RestActionTestCase`s
gwbrown 05f8fa1
Add `allow_system_index_access` flag to search spec
gwbrown 606d9c9
Add `allow_system_index_access` as necessary to Watcher tests
gwbrown d74939b
Add `allow_system_index_access` flag to count, index, index.delete specs
gwbrown 2122240
Add `allow_system_index_access` to ML REST tests as necessary
gwbrown a618ec1
Allow REST handlers to control whether they allow system index access
gwbrown 842e3ef
Fix NPE/client mock in RestSearchScrollActionTests
gwbrown d2acd60
Fix NPE/client mock in RestClearScrollActionTests
gwbrown 04eb2fa
Add allow_system_index_access flag to Get API
gwbrown a7ea769
Add allow_system_index_access flag to Security tests as necessary
gwbrown 05b80ab
Add allow_system_index_access flag to upgrade tests as necessary
gwbrown ce93851
Include system indices in cluster health by default
gwbrown fc88e41
Fix NPE/client mock in SecurityBaseRestHandlerTests
gwbrown f744cd5
Fix NPE/client mock in RestHasPrivilegesActionTests
gwbrown 853d874
Add allow_system_index_access flag to ML Restart tests as necessary
gwbrown 391f132
Add allow_system_index_access flag to cluster restart tests as necessary
gwbrown 2fdc53e
Add allow_system_index_access flag to Transform tests as necessary
gwbrown 01b1fb3
Clean up old comments
gwbrown 58d651f
Merge branch 'master' into si/protection-header
gwbrown 612c304
Allow Kibana APIs to access system indices by default.
gwbrown 6879de8
Fix NPE/client mock in RestGetUserPrivilegesActionTests
gwbrown 3924661
Rename and centralize system index access control header key
gwbrown 8e5b29e
Merge branch 'master' into si/protection-header
gwbrown 19147b7
Add allow_system_index_access flag to Transform Upgrade tests as nece…
gwbrown b80f516
Add allow_system_index_access flag to relevant REST specs
gwbrown 71da5f8
ClusterModule now requires a ThreadContext instead of a ThreadPool
gwbrown 9e5b251
Remove unnecessary null check in IndexNameExpressionResolver
gwbrown b4128e7
s/Boolean.parseBoolean/Booleans.parseBoolean
gwbrown 948e2bc
Remove accidental double space per review
gwbrown 0bc64f6
Ensure method is actually called in RestBulkActionTests
gwbrown 8d97b0f
Move allow_system key to constant & add version constant
gwbrown e16b6dc
Refactor ThreadContext header to use positive logic
gwbrown ed19899
Merge branch 'master' into si/protection-header
gwbrown 3e979d9
Fix test after inverting header logic
gwbrown 4a81438
Fix logic when attaching header
gwbrown be71f26
Merge branch 'master' into si/protection-header
gwbrown 766e7dd
Merge branch 'master' into si/protection-header
gwbrown f091c91
Merge branch 'master' into si/protection-header
gwbrown e708dcf
Fix compilation from merge
gwbrown c8588cc
Add `allow_system_index_access` flag to test
gwbrown 5325e0a
Remove unnecessary comment
gwbrown f69bc2b
INER tests for total wildcards
gwbrown 5852572
Add dedicated system index blocking/access integration test
gwbrown 8cadfca
Rules for aliases & system indices + unit tests
gwbrown c962c24
Clean up system index upgrade tests
gwbrown 1314cfd
Add allow_system_index_access flag to docs as necessary & docs updates
gwbrown f0a9b68
Add allow_no_indices to upgrade tests to ensure they fail if appropriate
gwbrown c2f21d2
Ensure we throw a 404 if a system index is explicitly requested, but …
gwbrown a17155c
Upgrade tests for alias logic
gwbrown 5307a69
Merge branch 'master' into si/protection-header
gwbrown 8d4f90c
Fix BWC tests to account for both upgrades from 7.x and current
gwbrown c742d4a
Rename constants to be clearer
gwbrown d16ba0e
Move constants & default access config to `RestHandler` (from `BaseRe…
gwbrown 159b40a
Move header attachment to `RestController#dispatchRequest` (from `Bas…
gwbrown a30107f
Merge branch 'master' into si/protection-header
gwbrown 9b07888
Use the correct ThreadContext in RestController
gwbrown 46854ab
Javadoc per review
gwbrown 30225b3
Ensure allowSystemIndexAccessByDefault is passed through SecurityRest…
gwbrown 0bf65e4
Switch to emitting a deprecation warning instead of changing behavior
gwbrown 89f3925
Merge branch 'master' into si/protection-header
gwbrown dbe52f4
Merge branch 'master' into si/protection-header
gwbrown 515b4eb
Correct NoOpNodeClient for changes in NodeClient
gwbrown 912f096
Merge branch 'master' into si/protection-header
gwbrown 39538e3
Implement "feature flag" for choosing system index access behavior
gwbrown e75c50f
Docs changes per review
gwbrown 06c7ca4
Formatting changes per review
gwbrown 966cfc3
allow_system_index_access flag in YAML tests as necessary
gwbrown d25c10d
Allow system index access in GetAliases, as disallowing it causes ver…
gwbrown a0a78f8
Allow system index access in GetDataStreamsStats, as disallowing it c…
gwbrown cba4fd7
Allow system index access in cat APIs, otherwise we get deprecation w…
gwbrown a3980e3
Remove allow_system flag from test that no longer needs it due to cha…
gwbrown 7770cb6
Remove allow_system flag from more tests that no longer needs it due …
gwbrown a22258a
Merge branch 'master' into si/protection-header
gwbrown 56d4d05
Add allow_system_index_access to docs tests where necessary
gwbrown 15ef7e8
Fix origin setting in Enrich classes
gwbrown 8e7d9c1
Add allow_system_index_access to reindex tests as necessary
gwbrown 712f1cc
Add allow_system_index_access to Watcher tests & test cleanup as nece…
gwbrown 37dc6df
Add allow_system_index_access to Monitoring test cleanup as necessary
gwbrown ef3e9cd
Add allow_system_index_access to Transform test cleanup as necessary
gwbrown a2dcb91
Merge branch 'master' into si/protection-header
gwbrown 83c2c52
add allow_system_index_access to Watcher cleanup
gwbrown 555910c
Remove now unnecessary allow_system_index_access from upgrade test
gwbrown 5e484f1
Add allow_system_index_access to ML tests as necessary
gwbrown 10c3886
Another allow_system_index_access test fix
gwbrown d20847b
Remove allow_system_index_access from TransformSurvivesUpgradeIT
gwbrown 1c579bc
Add allow_system_index_access as necessary in MlMappingsUpgradeIT
gwbrown bd4caf0
Ensure system index access is allowed for GetAliasesAction even if th…
gwbrown dd6c770
Merge branch 'master' into si/protection-header
gwbrown 773272e
Drop response headers during SQL index resolution to prevent deprecat…
gwbrown 2beeb31
Drop response headers during Enrich reindex to prevent deprecation wa…
gwbrown df0a9b2
Merge branch 'master' into si/protection-header
gwbrown 646dd12
Fix compilation error due to merge
gwbrown 676d0e3
Merge branch 'master' into si/protection-header
gwbrown 02cf28e
ThreadPool -> ThreadContext in test per review
gwbrown c405757
Formatting per review
gwbrown 0be7d2b
Add comment on enrich hack
gwbrown 56faa3f
Merge branch 'master' into si/protection-header
gwbrown 828879c
Expect deprecation warnings in ML upgrade tests
gwbrown e5f9067
Merge branch 'master' into si/protection-header
gwbrown ba55f39
Wording change per review
gwbrown a67c2b2
Update comment per review
gwbrown 4c8763b
Factor out shared stream/map code per review
gwbrown fcd6af9
Break up large INER test cases per review
gwbrown c3bedf6
Tweak method name
gwbrown 70a8114
Actually pass parameter in ML upgrade tests per review
gwbrown a621a3e
Break up IndexAbstractionTests per review
gwbrown 89df7c8
Merge branch 'master' into si/protection-header
gwbrown 0cf4411
Add origin for Logstash management APIs
gwbrown 97bde46
Always allow system indiex warnings in ML index template tests
gwbrown 240a6f0
Use test assumptions instead of setting system properties per review
gwbrown d38d150
Merge branch 'master' into si/protection-header
gwbrown 46b646d
Merge branch 'master' into si/protection-header
gwbrown 1972b9f
Merge branch 'master' into si/protection-header
gwbrown 8fd1e26
Do not emit deprecation warnings on total wildcard queries
gwbrown 9459027
Remove system index access by default from APIs which no longer need it
gwbrown 8e990ec
First cut of security integration for _all handling
gwbrown 24682c2
Add yet another allow_system_index_access flag as necessary
gwbrown 3218750
Add yet more allow_system_index_access flag as necessary
gwbrown 50a013c
Check if a deprecation warning should be emitted rather than allowing…
gwbrown c8d55a5
Remove header drop from IndexResolver
gwbrown 9c15ae8
Set original indices header OUTSIDE of the context preserving listener
gwbrown 6b2db2f
Merge branch 'master' into si/protection-header
gwbrown dfb6c78
Line lengths
gwbrown e767311
Merge branch 'master' into si/protection-header
gwbrown 2d17229
Merge branch 'master' into si/protection-header
gwbrown 9f7790f
Replace allow_system_index_access flags in Java tests with warnings h…
gwbrown 08c2ec9
Replace allow_system_index_access flags in yaml tests with warnings h…
gwbrown 7a2606f
Merge branch 'master' into si/protection-header
gwbrown bb27000
Remove a couple unnecessary warning checks (they might be back later)
gwbrown e3c4d81
The current security index is `.security-7`, not just ``.security`
gwbrown 3ac9ecf
Fix skip:feature block in YAML test
gwbrown d3f5cd5
Add missing warning handler for current version
gwbrown 3668a7b
Undo _all special case handling
gwbrown acc455a
Remove allow_system_index_access flag
gwbrown aa48e20
More `.security` -> `.security-7` in expected warnings
gwbrown f2520dc
Merge branch 'master' into si/protection-header
gwbrown 04b7e4b
Unused import
gwbrown e9d5332
Work around _all resolution in Get Aliases API
gwbrown 51e4d50
Specify index in "Test wildcard job id" so we don't get a warning
gwbrown 661ce27
Accept warning in SQL test that might trigger it
gwbrown 5c07fea
Allow system index access in APIs we're confident we want it
gwbrown dad9bd1
Merge branch 'master' into si/protection-header
gwbrown 7013691
Spotless
gwbrown a5f080e
Merge branch 'master' into si/protection-header
gwbrown 2e138fd
Respect system index access header when re-adding deprecation in Get …
gwbrown df094c3
Handle Get Alias deprecation warning in upgrade test
gwbrown 2cb62db
Allow data streams stats action to only resolve to data streams
gwbrown e4f9d86
Merge branch 'master' into si/protection-header
gwbrown a00a0c7
Allow deprecation warning on another alias call
gwbrown aaa9759
Allow _cat/aliases to access system indices by default because it's w…
gwbrown 1f989c7
Allow deprecation warning on wildcard Get Aliases call in MlJobIT
gwbrown cae36a5
Remove unnecessary semicolon
gwbrown 7cb23dd
Merge branch 'master' into si/protection-header
gwbrown 0eb283c
Fix compilation after merge
gwbrown 0e302e6
Remove "feature flag" for deprecation warnings
gwbrown 07aacba
Merge branch 'master' into si/protection-header
gwbrown 5df4c3f
Refresh no longer allow system index access by default
gwbrown 0eb3eb8
Remove unnecessary log line
gwbrown 591b442
Don't create a new threadcontext, we already have one
gwbrown 906e024
Don't need to take ThreadContext as a param in dispatchRequest
gwbrown e23a25b
Javadoc for isSystemIndexAccessAllowed
gwbrown b924de5
Deprecation logger doesn't need to be public
gwbrown d3eb247
Doc fix per review
gwbrown c223029
Allow deprecation warning for refreshing all indices
gwbrown ebabb5a
Allow warnings on refresh in reindex YAML tests
gwbrown d7b0f8e
Properly populate client in RestControllerTests now that it's actuall…
gwbrown 45cf15d
Stash context in RestSubmitAsyncSearchActionTests so the same headers…
gwbrown 49bf8c5
Handle more _refresh warnings
gwbrown 18b98ce
YAML skip: features: warnings block
gwbrown 2a6bbb2
Address _refresh warnings in yaml tests
gwbrown 5c92e96
Warn when accessing aliases with names reserved for system indices
gwbrown c852f30
Suppress warnings when `X-elastic-product-origin` header is present
gwbrown 5276b12
Merge branch 'master' into si/protection-header
gwbrown 833215a
EMPTY_MAP -> emptyMap()
gwbrown f7c9e5b
Invert incorrect header check
gwbrown c4e5ed8
Add comment about header
gwbrown 9d5dc5f
YAML syntax is THE WORST
gwbrown 5211807
More specifying _refresh more closely in YAML tests
gwbrown 1e4223b
Yet another _refresh call with a warning
gwbrown 4e6c6d2
Fix a couple _refresh calls that got mixed up
gwbrown b9342bb
Even more _refresh index specifying
gwbrown 0ea0be5
Another _refresh that sparks a warning
gwbrown dac5c74
Review feedback
gwbrown a014f0f
Merge branch 'master' into si/protection-header
gwbrown File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add allow_system_index_access to docs tests where necessary
Note: these should be removed and replaced with actual APIs everywhere this is necessary.
commit 56d4d058df864189f2bfd816ba727b36f0cfea59
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should open an issue for the watcher docs since we need to stop accessing
.watches
directlyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this to the list of tests that need to be adjusted to remove this flag (#62501).