@@ -84,27 +84,33 @@ requested set of cluster, index, and application privileges:
8484
8585[source,console]
8686--------------------------------------------------
87- POST /_security/user /_has_privileges
87+ POST /_security/profile /_has_privileges
8888{
89- "uids": ["u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0", "u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1"],
90- "cluster": [ "monitor", "create_snapshot", "manage_ml" ],
91- "index" : [
92- {
93- "names": [ "suppliers", "products" ],
94- "privileges": [ "create_doc"]
95- },
96- {
97- "names": [ "inventory" ],
98- "privileges" : [ "read", "write" ]
99- }
89+ "uids": [
90+ "u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0",
91+ "u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1",
92+ "u_does-not-exist_0"
10093 ],
101- "application": [
102- {
103- "application": "inventory_manager",
104- "privileges" : [ "read", "data:write/inventory" ],
105- "resources" : [ "product/1852563" ]
106- }
107- ]
94+ "privileges": {
95+ "cluster": [ "monitor", "create_snapshot", "manage_ml" ],
96+ "index" : [
97+ {
98+ "names": [ "suppliers", "products" ],
99+ "privileges": [ "create_doc"]
100+ },
101+ {
102+ "names": [ "inventory" ],
103+ "privileges" : [ "read", "write" ]
104+ }
105+ ],
106+ "application": [
107+ {
108+ "application": "inventory_manager",
109+ "privileges" : [ "read", "data:write/inventory" ],
110+ "resources" : [ "product/1852563" ]
111+ }
112+ ]
113+ }
108114}
109115--------------------------------------------------
110116// TEST[skip:TODO setup and tests will be possible once the profile uid is predictable]
0 commit comments