-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path130_user_profile.yml
101 lines (95 loc) · 2.15 KB
/
130_user_profile.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
requires:
stack: true
serverless: false
---
setup:
- do:
security.put_user:
username: "juan"
body: >
{
"password" : "s3krit-password",
"roles" : [ "superuser" ],
"full_name" : "Juan Pérez",
"email" : "juan@bazooka.gum"
}
---
teardown:
- do:
security.delete_user:
username: "juan"
ignore: 404
---
"Security User Profiles":
- do:
security.activate_user_profile:
body: >
{
"grant_type": "password",
"username": "juan",
"password" : "s3krit-password"
}
- set: { uid: profile_uid }
# enabled right after activation
- do:
security.get_user_profile:
uid: "$profile_uid"
- set: { profiles.0: profile }
- is_true: "$profile.enabled"
# disable the profile
- do:
security.disable_user_profile:
uid: "$profile_uid"
- do:
security.get_user_profile:
uid: "$profile_uid"
- set: { profiles.0: profile }
- is_false: "$profile.enabled"
# enable again
- do:
security.enable_user_profile:
uid: "$profile_uid"
- do:
security.get_user_profile:
uid: "$profile_uid"
- set: { profiles.0: profile }
- is_true: "$profile.enabled"
- do:
security.has_privileges_user_profile:
body:
uids:
- $profile_uid
privileges:
index:
- names:
- index1*
privileges:
- read
- is_true: has_privilege_uids
- do:
security.suggest_user_profiles:
body: >
{
"name": "juan",
"size": 5,
"hint": {
"labels": {
"direction": ["north", "east"]
}
}
}
# None of the hints matches. But name match is sufficient
- length: { profiles: 1 }
- do:
security.update_user_profile_data:
uid: "$profile_uid"
body: >
{
"labels": {
"kibana": {
"spaces": "demo"
}
}
}
- is_true: acknowledged