Skip to content
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

Filter panel doesn't get populated with field values on alias index for non-super user #111642

Open
bhavyarm opened this issue Sep 8, 2021 · 8 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Filters Feature:Search Querying infrastructure in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort regression Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph)
Projects

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Sep 8, 2021

Kibana version: 7.15.0 , 7.14.1

Elasticsearch version: 7.15.0, 7.14.1

Server OS version: darwin_x86_64

Browser version: chrome latest

Browser OS version: OS X

Original install method (e.g. download page, yum, from source, etc.): from staging

Describe the bug: If a non-super user tries to build a filter using alias fields - Kibana displays empty for field values drop down.
Please note the same filter panel works fine for super user.

This is a regression in 7.14.1. Worked fine in 7.13.4

Alias index:
Screen Shot 2021-09-08 at 3 40 15 PM

Empty filter panel:
Screen Shot 2021-09-08 at 3 29 24 PM

These are my role details:
GET /_security/role/aliasrole

This bug is the result of a support ticket linked. Please note this doesn't work in 7.15.0 & 7.14.1 but works in 7.13.x. Can we also get some tests along with the fix?

{
  "aliasrole" : {
    "cluster" : [
      "all"
    ],
    "indices" : [
      {
        "names" : [
          "indextest"
        ],
        "privileges" : [
          "all"
        ],
        "field_security" : {
          "grant" : [
            "*"
          ],
          "except" : [ ]
        },
        "allow_restricted_indices" : false
      }
    ],
    "applications" : [
      {
        "application" : "kibana-.kibana",
        "privileges" : [
          "space_all"
        ],
        "resources" : [
          "space:default"
        ]
      }
    ],
    "run_as" : [ ],
    "metadata" : { },
    "transient_metadata" : {
      "enabled" : true
    }
  }
}
@bhavyarm bhavyarm added the bug Fixes for quality problems that affect the customer experience label Sep 8, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 8, 2021
@bhavyarm bhavyarm added Team:AppServices and removed needs-team Issues missing a team label labels Sep 8, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@bhavyarm bhavyarm changed the title Filter panel doesn't get populated with fields on alias index for non-super user Filter panel doesn't get populated with field values on alias index for non-super user Sep 9, 2021
@LeeDr
Copy link
Contributor

LeeDr commented Sep 9, 2021

Bhavya and I worked on this and figured out that the user needs read and view_index_metadata (or at least one of those) on the index itself, and also on the alias. The expected behavior is that they only need permissions on the alias.

I don't really know if the issue is in Kibana or Elasticsearch. It could be that Kibana is dereferencing the alias to the index name and querying Elasticsearch with the index name? Or that Elasticsearch is checking the user privs on the index instead of the alias?

@bhavyarm
Copy link
Contributor Author

bhavyarm commented Sep 9, 2021

Please note this works fine if you change Autocomplete value suggestion method in advanced settings to terms_agg from terms_enum (terms_enum is default)

Screen Shot 2021-09-09 at 11 27 46 AM

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Sep 21, 2021
@rayafratkina rayafratkina added Feature:Discover Discover Application Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) labels Oct 21, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@kibanamachine kibanamachine added this to Inbox in Discover Oct 21, 2021
@rayafratkina
Copy link
Contributor

This seems to be a fairly significant issue on Discover - user may not be able to see what then need in Discover even while they are able to see this data elsewhere (Dev Tools for example).

Security team suggested that we should require administrators to grant both read and view_index_metadata. For a while Discover worked with just read if the index pattern already existed. However now that the field cache is gone from the index pattern/data view, we really require view_index_metadata for Discover to function. Perhaps it's time to make this change?

@mattkime
Copy link
Contributor

Would it be worthwhile to reexamine why view_index_metadata is required in addition to read? I know it has to do with the field caps api and decisions made by the ES team but I really have zero insight into any of it. From a naive perspective, 'read' should mean 'read' full stop.

@timroes
Copy link
Contributor

timroes commented Oct 25, 2021

Removing the Discover labels here. There seems to be no Discover specific details to this (unless I missunderstand the issue)? It's caused by index patterns and the search bar, both owned by app services.

@timroes timroes removed Feature:Discover Discover Application Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) labels Oct 25, 2021
@kibanamachine kibanamachine removed this from Inbox in Discover Oct 25, 2021
@LeeDr
Copy link
Contributor

LeeDr commented Nov 3, 2021

Would it be worthwhile to reexamine why view_index_metadata is required in addition to read? I know it has to do with the field caps api and decisions made by the ES team but I really have zero insight into any of it. From a naive perspective, 'read' should mean 'read' full stop.

@mattkime I'm trying to find it in the older version docs but haven't found it yet. But I know those 2 privs have been required when creating index patterns in Kibana for a really long time. I think even before we combined the security plugin (Shield) into x-pack.

@petrklapka petrklapka added Feature:Search Querying infrastructure in Kibana Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) and removed Team:AppServicesSv labels Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Filters Feature:Search Querying infrastructure in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort regression Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph)
Projects
No open projects
Development

No branches or pull requests

7 participants