"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/x-pack/plugin/src/test/resources/rest-api-spec/test/role_mapping/10_basic.yml" (29 Dec 2021, 1104 Bytes) of package /linux/www/elasticsearch-6.8.23-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ---
    2 setup:
    3   - skip:
    4       features: headers
    5 
    6   - do:
    7       cluster.health:
    8         wait_for_status: yellow
    9 
   10 ---
   11 teardown:
   12   - do:
   13       xpack.security.delete_role_mapping:
   14         name: "everyone"
   15         ignore: 404
   16 ---
   17 "Test put role_mapping api":
   18   - do:
   19       xpack.security.put_role_mapping:
   20         name: "everyone"
   21         body:  >
   22             {
   23                "enabled": true,
   24                "roles": [ "kibana_user" ],
   25                "rules": { "field": { "username": "*" } },
   26                "metadata": {
   27                   "uuid" : "b9a59ba9-6b92-4be2-bb8d-02bb270cb3a7"
   28                }
   29             }
   30   - match: { role_mapping: { created: true } }
   31 
   32   # Get by name
   33   - do:
   34       xpack.security.get_role_mapping:
   35         name: "everyone"
   36   - match: { everyone.enabled:  true }
   37   - match: { everyone.roles.0:  "kibana_user" }
   38   - match: { everyone.rules.field.username:  "*" }
   39 
   40   # Get all
   41   - do:
   42       xpack.security.get_role_mapping:
   43         name: null
   44   - match: { everyone.enabled:  true }
   45   - match: { everyone.roles.0:  "kibana_user" }
   46   - match: { everyone.rules.field.username:  "*" }