Entitlements quickstart
This page provides an example of how to entitle users to query data from an assembly called sdk-sample-assembly
. It assumes that two sample groups, "dataScience" and "dashboardUsers", have been created.
Make sure that you have completed the prerequisites before using this quickstart.
Create an entitlement
-
Find the Group IDs provided by Keycloak for the "dataScience" and "dashboardUsers" groups.
To do this, call the
kxi entitlement actors
command:kxi entitlement actors
[ { "id": "4745c0ae-4ef0-4bba-a310-bd2fc7236484", "name": "dataScience", "path": "/dataScience" }, { "id": "7dcd08d8-28d9-40ae-9d9a-399a3ccc688f", "name": "dashboardUsers", "path": "/dashboardUsers" } ]
-
Store each group ID to a variable called
$GROUPID1
,$GROUPID2
. - Store an access level permission for each group to a variable called
$ACCESS
. This example usesRWX
for both groups. - Create an ID for the
sdk-sample-assembly
. In this example we have generated one calleda3f7be9f-8bd3-41b0-8c29-c50e19ac3914
. -
Call the
kxi entitlement create
command as follows:ID=a3f7be9f-8bd3-41b0-8c29-c50e19ac3914 NAME=sdk-sample-assembly TYPE=assembly ACCESS=RWX kxi entitlement create $ID $NAME $TYPE --groups $GROUPIDs:$ACCESS
-
Check the entitlement was created by calling
kxi entitlement list
orkxi entitlement get
.In this example we call the
get
command, passing in the ID of the newly created entity.kxi entitlement list kxi entitlement get $ID
Refer to Change synchronization for details about the time kdb Insights Enterprise takes to action any updates
Refer to the kdb Insights CLI documentation for full details on the kxi entitlement
command and Entitlements fields for an explanation of the fields returned by the commands executed above.
Next steps
Learn how to modify an entitlement in the configuration guide.