OpenSearch/client
Tim Vernum 2c770ba3cb
Support mustache templates in role mappings (#40571)
This adds a new `role_templates` field to role mappings that is an
alternative to the existing roles field.

These templates are evaluated at runtime to determine which roles should be
granted to a user.
For example, it is possible to specify:

    "role_templates": [
      { "template":{ "source": "_user_{{username}}" } }
    ]

which would mean that every user is assigned to their own role based on
their username.

You may not specify both roles and role_templates in the same role
mapping.

This commit adds support for templates to the role mapping API, the role
mapping engine, the Java high level rest client, and Elasticsearch
documentation.

Due to the lack of caching in our role mapping store, it is currently
inefficient to use a large number of templated role mappings. This will be
addressed in a future change.

Backport of: #39984, #40504
2019-04-02 20:55:10 +11:00
..
benchmark Converting randomized testing to create a separate unitTest task instead of replacing the builtin test task (#36311) 2018-12-19 08:25:20 +02:00
client-benchmark-noop-api-plugin Don't emit deprecation warnings on calls to the monitoring bulk API. (#39805) (#39838) 2019-03-11 07:58:28 +01:00
rest Drop support for the low-level REST client on JDK 7 (#38540) 2019-02-08 19:48:44 -05:00
rest-high-level Support mustache templates in role mappings (#40571) 2019-04-02 20:55:10 +11:00
sniffer Drop support for the low-level REST client on JDK 7 (#38540) 2019-02-08 19:48:44 -05:00
test Drop support for the low-level REST client on JDK 7 (#38540) 2019-02-08 19:48:44 -05:00
transport Testing conventions now checks for tests in main (#37321) 2019-01-24 17:30:50 +02:00