Unified storage: Remove unifiedStorageSearchPermissionFiltering feature flag (#109216)
* Unified storage: Remove unifiedStorageSearchPermissionFiltering ff * unit test
This commit is contained in:
@@ -263,8 +263,6 @@ unifiedStorageSearchUI = true
|
||||
unifiedStorageSearch = true
|
||||
; (optional) Allows you to sort dashboards by usage insights fields when using enterprise
|
||||
; unifiedStorageSearchSprinkles = true
|
||||
; (optional) Will skip search results filter based on user permissions
|
||||
; unifiedStorageSearchPermissionFiltering = false
|
||||
```
|
||||
|
||||
The dashboard search page has been set up to search unified storage. Additionally, all legacy search calls (e.g. `/api/search`) will go to
|
||||
@@ -871,7 +869,6 @@ Unified Search requires several feature flags to be enabled depending on the des
|
||||
|--------------|---------|-------|--------------|
|
||||
| `unifiedStorageSearch` | Core search functionality | Experimental | Search API servers, indexing |
|
||||
| `unifiedStorageSearchUI` | Frontend search interface | Experimental | Grafana UI search |
|
||||
| `unifiedStorageSearchPermissionFiltering` | User permission filtering | GA | Access control in search results |
|
||||
| `unifiedStorageSearchSprinkles` | Usage insights integration | Experimental | Dashboard usage sorting (Enterprise) |
|
||||
| `unifiedStorageSearchDualReaderEnabled` | Shadow traffic to unified search | Experimental | Shadow traffic during migration |
|
||||
|
||||
@@ -887,9 +884,6 @@ unifiedStorageSearch = true
|
||||
; Enable search UI (required for frontend)
|
||||
unifiedStorageSearchUI = true
|
||||
|
||||
; Enable permission filtering (recommended)
|
||||
unifiedStorageSearchPermissionFiltering = true
|
||||
|
||||
; Enable shadow traffic during migration (optional)
|
||||
unifiedStorageSearchDualReaderEnabled = true
|
||||
|
||||
|
||||
@@ -961,7 +961,7 @@ func (b *bleveIndex) toBleveSearchRequest(ctx context.Context, req *resourcepb.R
|
||||
searchrequest.Query = bleve.NewConjunctionQuery(queries...) // AND
|
||||
}
|
||||
|
||||
if access != nil && b.features.IsEnabledGlobally(featuremgmt.FlagUnifiedStorageSearchPermissionFiltering) {
|
||||
if access != nil {
|
||||
auth, ok := authlib.AuthInfoFrom(ctx)
|
||||
if !ok {
|
||||
return nil, resource.AsErrorResult(fmt.Errorf("missing auth info"))
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestBleveSearchBackend(t *testing.T) {
|
||||
backend, err := NewBleveBackend(BleveOptions{
|
||||
Root: tempDir,
|
||||
FileThreshold: 5,
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(featuremgmt.FlagUnifiedStorageSearchPermissionFiltering), nil)
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(), nil)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, backend)
|
||||
|
||||
@@ -44,7 +44,7 @@ func TestSearchBackendBenchmark(t *testing.T) {
|
||||
// Create a new bleve backend
|
||||
backend, err := NewBleveBackend(BleveOptions{
|
||||
Root: tempDir,
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(featuremgmt.FlagUnifiedStorageSearchPermissionFiltering), nil)
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(), nil)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, backend)
|
||||
|
||||
|
||||
@@ -533,7 +533,7 @@ func newTestDashboardsIndex(t TB, threshold int64, size int64, batchSize int64,
|
||||
Root: tmpdir,
|
||||
FileThreshold: threshold, // use in-memory for tests
|
||||
BatchSize: int(batchSize),
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(featuremgmt.FlagUnifiedStorageSearchPermissionFiltering), nil)
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(), nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
rv := int64(10)
|
||||
|
||||
@@ -47,7 +47,7 @@ func TestBleveBackend(t *testing.T) {
|
||||
backend, err := NewBleveBackend(BleveOptions{
|
||||
Root: tmpdir,
|
||||
FileThreshold: 5, // with more than 5 items we create a file on disk
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(featuremgmt.FlagUnifiedStorageSearchPermissionFiltering), nil)
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(), nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
rv := int64(10)
|
||||
@@ -750,7 +750,7 @@ func setupBleveBackend(t *testing.T, fileThreshold int, cacheTTL time.Duration,
|
||||
Root: dir,
|
||||
FileThreshold: int64(fileThreshold),
|
||||
IndexCacheTTL: cacheTTL,
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(featuremgmt.FlagUnifiedStorageSearchPermissionFiltering), metrics)
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(), metrics)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, backend)
|
||||
t.Cleanup(backend.closeAllIndexes)
|
||||
|
||||
@@ -71,7 +71,7 @@ func TestIntegrationBenchmarkResourceServer(t *testing.T) {
|
||||
// Create a new bleve backend
|
||||
search, err := search.NewBleveBackend(search.BleveOptions{
|
||||
Root: tempDir,
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(featuremgmt.FlagUnifiedStorageSearchPermissionFiltering), nil)
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(), nil)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, search)
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ func TestIntegrationSearchAndStorage(t *testing.T) {
|
||||
search, err := search.NewBleveBackend(search.BleveOptions{
|
||||
FileThreshold: 0,
|
||||
Root: tempDir,
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(featuremgmt.FlagUnifiedStorageSearchPermissionFiltering), nil)
|
||||
}, tracing.NewNoopTracerService(), featuremgmt.WithFeatures(), nil)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, search)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user