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

Security, Aliases and Closed indices confuse open-only wildcard expansion #29948

Closed
elasticmachine opened this issue Jun 2, 2017 · 6 comments
Labels
>bug :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC

Comments

@elasticmachine
Copy link
Collaborator

Original comment by @bleskes:

X-pack has a security away wild expanses logic. When resolving requests which expand wild cards to open indices (almost all monitoring/search requests) if the cluster has a closed index which has an alias.

PUT index
{
  "settings": {
    "number_of_shards": 1
  }
}

POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "index",
        "alias": "alias1"
      }
    }
  ]
}

POST index/_close

## this will go boom.
GET _cat/shards?v

as far as I can tell this is present in 5.4 & master. Looking at it with Jay, the culprit is a combination of AuthorizedIndices expanding empty index lists to include aliases, the logic in IndicesAndAliasesResolver#isIndexVisible that doesn't remove aliases if they point to closed indices and the normal logic in ES that explodes if a request asks for an index/alias that is closed.

@elasticmachine
Copy link
Collaborator Author

Original comment by @bczifra:

EMAIL REDACTED @jaymode If they remove the alias pointing to the closed index, will will that resolve the error?~~ wrong repo

@elasticmachine
Copy link
Collaborator Author

Original comment by @gmoskovicz:

@jaymode i see that the PR that fixes this doesn't have a version label. When is this going to be added ? Is this fix available in any 5.x versions?

@elasticmachine
Copy link
Collaborator Author

Original comment by @jasontedor:

@gmoskovicz That PR was closed without being merged anywhere, that's why there are no version labels and that's why this issue is still open.

@elasticmachine
Copy link
Collaborator Author

Original comment by @gmoskovicz:

@jasontedor 🤕 thanks for that i missed that part.

@javanna
Copy link
Member

javanna commented Dec 28, 2018

@jaymode should this be closed as a duplicate of #32238 ?

@jaymode
Copy link
Member

jaymode commented Jan 7, 2019

@javanna that's correct. Thanks for the ping, I am closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC
Projects
None yet
Development

No branches or pull requests

3 participants