-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path50_roles_serverless.yml
42 lines (39 loc) · 1 KB
/
50_roles_serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
requires:
stack: false
serverless: true
---
"Test put role api":
- do:
security.put_role:
name: "admin_role"
body: >
{
"metadata": {
"key1" : "val1",
"key2" : "val2"
},
"indices": [
{
"names": "*",
"privileges": ["all"]
}
]
}
- match: { role: { created: true } }
- do:
security.get_role:
name: "admin_role"
- match: { admin_role.metadata.key1: "val1" }
- match: { admin_role.metadata.key2: "val2" }
- match: { admin_role.indices.0.names.0: "*" }
- match: { admin_role.indices.0.privileges.0: "all" }
- do:
security.get_builtin_privileges: {}
# On the client side we don't really care what the values are, just that we've received a correct
# response and parsed it:
- is_true: cluster
- is_true: index
- do:
security.delete_role:
name: "admin_role"