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

Validate query field when creating roles #46275

Merged
merged 16 commits into from
Sep 25, 2019
Merged

Commits on Sep 5, 2019

  1. Validate query field when creating roles

    As of now the validation occurs at runtime when the query is being
    executed. I think the reason was due to the use of template queries
    which need runtime information as they need to be evaluated like
    user information.
    
    This commit adds validation for the role query but **not for the
    template query** as we do not have the runtime information required
    for evaluating the template query.
    This also corrects some tests and roles.yml files where the `query` field was not
    populated correctly.
    For validation, the query is evaluated (if not a template), parsed to build the
    `QueryBuilder` and verify if the query type is allowed.
    
    Closes elastic#34252
    Yogesh Gaikwad committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    6e1c8b6 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2019

  1. address review comments

    Yogesh Gaikwad committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    3a5915a View commit details
    Browse the repository at this point in the history
  2. address review comments

    Yogesh Gaikwad committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    8e849ff View commit details
    Browse the repository at this point in the history
  3. Merge branch 'master' into 34252-fix

    Yogesh Gaikwad committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    5649a69 View commit details
    Browse the repository at this point in the history
  4. address review comments

    Yogesh Gaikwad committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    8cc234e View commit details
    Browse the repository at this point in the history
  5. precommit error

    Yogesh Gaikwad committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    98edc47 View commit details
    Browse the repository at this point in the history
  6. oh precommits

    Yogesh Gaikwad committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    93d0930 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2019

  1. Address review comments

    - add index privileg index to the error message to denote query of which
    index privilege failed to validate.
    - add more information to the error message where we know the expected values
    Yogesh Gaikwad committed Sep 12, 2019
    Configuration menu
    Copy the full SHA
    a1112a5 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into 34252-fix

    Yogesh Gaikwad committed Sep 12, 2019
    Configuration menu
    Copy the full SHA
    f4b92af View commit details
    Browse the repository at this point in the history
  3. Address review comments

    - public to package protected method
    - return immediately for simpler methods
    - correct the logic in file roles and add tests
    Yogesh Gaikwad committed Sep 12, 2019
    Configuration menu
    Copy the full SHA
    145338e View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2019

  1. throw error when has privileges request contains index privilege with…

    … DLS query
    Yogesh Gaikwad committed Sep 23, 2019
    Configuration menu
    Copy the full SHA
    1bcdf18 View commit details
    Browse the repository at this point in the history
  2. add missing license header

    Yogesh Gaikwad committed Sep 23, 2019
    Configuration menu
    Copy the full SHA
    dc5afd4 View commit details
    Browse the repository at this point in the history
  3. add better message to help users and is machine readable

    Yogesh Gaikwad committed Sep 23, 2019
    Configuration menu
    Copy the full SHA
    bc901ce View commit details
    Browse the repository at this point in the history
  4. Merge branch 'master' into 34252-fix

    Yogesh Gaikwad committed Sep 23, 2019
    Configuration menu
    Copy the full SHA
    340f91b View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2019

  1. Merge branch 'master' into 34252-fix

    Yogesh Gaikwad committed Sep 25, 2019
    Configuration menu
    Copy the full SHA
    cafa9e9 View commit details
    Browse the repository at this point in the history
  2. Address review comments

    Yogesh Gaikwad committed Sep 25, 2019
    Configuration menu
    Copy the full SHA
    0708e44 View commit details
    Browse the repository at this point in the history