-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
All system indices are hidden indices #79512
All system indices are hidden indices #79512
Conversation
qa/smoke-test-http/src/test/java/org/elasticsearch/http/SystemIndexRestIT.java
Outdated
Show resolved
Hide resolved
.../java/org/elasticsearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/MetadataUpdateSettingsService.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/indices/SystemIndexManagerTests.java
Outdated
Show resolved
Hide resolved
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.
LGTM, thanks for your hard work and iteration on this one! Chasing down everywhere that needs to be changed for something like this isn't easy.
Pinging @elastic/es-core-infra (Team:Core/Infra) |
@elasticmachine test this please |
Hi @williamrandolph, I've created a changelog YAML for you. |
System indices should be hidden from users. Since they are already restricted indices, a users that can't view restricted indices already can't see or access them, but they should also be hidden for superusers or users that are otherwise granted advanced privileges. To the greatest degree possible, we apply hidden settings in the transport layer, so that the system can create an index or alias that is set to visible, for example, when operating in a mixed cluster mode. However, in the case of aliases created by templates, we hide the alias in the service layer. This change has broken a number of tests that were relaying unnecessarily on wildcard searches. In general, the fix for these issues was to apply expand_wildcards=open,hidden to the request. * Force system indices to be hidden in IndexMetadata * Hide system data streams * Update feature migration tests * ML datafeed config defaults to searching hidden indices * Prevent unmanaged system indices from becoming visible * Change validation in TransportUpdateSettingsAction * Validate index creation settings in transport action * Make sure system data stream backing indices are hidden * Make sure transport request adds hidden index setting if missing * Validate and set default for autocreated system indices * Add some code to hide system aliases * Hide system aliases in create index service * Hide system aliases when adding them via alias endpoints * Check system indices when simulating and validating templates * Add known issue for reenabling tests * Update docs/changelog/79512.yaml
💚 Backport successful
|
System indices should be hidden from users. Since they are already restricted indices, a users that can't view restricted indices already can't see or access them, but they should also be hidden for superusers or users that are otherwise granted advanced privileges. To the greatest degree possible, we apply hidden settings in the transport layer, so that the system can create an index or alias that is set to visible, for example, when operating in a mixed cluster mode. However, in the case of aliases created by templates, we hide the alias in the service layer. This change has broken a number of tests that were relaying unnecessarily on wildcard searches. In general, the fix for these issues was to apply expand_wildcards=open,hidden to the request. * Force system indices to be hidden in IndexMetadata * Hide system data streams * Update feature migration tests * ML datafeed config defaults to searching hidden indices * Prevent unmanaged system indices from becoming visible * Change validation in TransportUpdateSettingsAction * Validate index creation settings in transport action * Make sure system data stream backing indices are hidden * Make sure transport request adds hidden index setting if missing * Validate and set default for autocreated system indices * Add some code to hide system aliases * Hide system aliases in create index service * Hide system aliases when adding them via alias endpoints * Check system indices when simulating and validating templates * Add known issue for reenabling tests * Update docs/changelog/79512.yaml
System indices should be hidden from users. Since they are already restricted indices, a users that can't view restricted indices already can't see or access them, but they should also be hidden for superusers or users that are otherwise granted advanced privileges.
To the greatest degree possible, we apply hidden settings in the transport layer, so that the system can create an index or alias that is set to visible, for example, when operating in a mixed cluster mode. However, in the case of aliases created by templates, we hide the alias in the service layer.
This change has broken a number of tests that were relaying unnecessarily on wildcard searches. In general, the fix for these issues was to apply
expand_wildcards=open,hidden
to the request.