Skip to content

Commit 2adc413

Browse files
author
GitHub Action Sync Bot
committed
Update from source repository (workflow run: 19518238943) (PR #15558) (commit: 75c77fb980043e096b1a7d638be7fc6f0fd15ba8) (branch: 10.15.0.cl)
1 parent 890fdbc commit 2adc413

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

cloud/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@
901901
*** xref:security-rls.adoc[Row-level security]
902902
**** xref:security-rls-concept.adoc[How rule-based RLS works]
903903
**** xref:security-rls-implement.adoc[Set rule-based RLS]
904+
**** xref:rls-variables-reference.adoc[]
904905
*** xref:data-masking.adoc[]
905906
*** xref:security-thoughtspot-lifecycle.adoc[ThoughtSpot lifecycle]
906907
** xref:models-simplify.adoc[Simplify search with Models]

cloud/modules/ROOT/pages/10-14-0-cl.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ Row-level security support in explore workflow filters::
109109
ThoughtSpot now supports row-level security in explore workflow filters independent of the index functionality.
110110
+
111111
NOTE: Search suggestions continue to leverage the index functionality.
112+
113+
//Naomi. jira: SCAL-257924. docs jira: SCAL-268027
114+
// PM: Damian
115+
[#variables]
116+
Variables in row-level security rules:: You can now create variables for use in row-level security definitions, assigning values individually to users rather than using the xref:security-rls-concept.adoc#examples-of-rls-rules[ts_username, ts_groups, or ts_groups_int system variables].
117+
112118
[#groups-level]
113119
Groups level data inclusion in the AI and BI system Liveboard::
114120
The AI and BI system Liveboard now features group-level filters and a Group tab with visualizations like Group Champions, Most Popular Data Model, and Group Breakdown. Provisioned user information, including both active and inactive users, is now a primary KPI, and replaces the earlier Daily Active Users KPI.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
= Variables in row-level security
2+
:last_updated: 11/12/2025
3+
:author: Naomi
4+
:experimental:
5+
:linkattrs:
6+
:description:
7+
:jira: SCAL-268027
8+
9+
You can now create variables for use in row-level security definitions, assigning values individually to users rather than using the xref:security-rls-concept.adoc#examples-of-rls-rules[ts_username, ts_groups, or ts_groups_int system variables]. The previously defined system variables had a few limitations; they required maintaining multiple group memberships, they sometimes created inefficient SQL statements, and the names for the groups could be confusing if they were the same as values for existing columns (for example, a South group when the data included a South region).
10+
11+
Assigning variables directly to a user provides clearer rule definitions, more efficient SQL, and separation of concerns between organizational groups and data attributes.
12+
13+
14+
== Creating row-level security variables
15+
16+
To create a row-level security variable, you must be an admin in all Orgs, or an admin user in a specific Org. You also need access to the Developer playground, as you create and maintain these variables in the Developer playground, and reference them within row-level security rules on a table. For more information on how to use APIs to create variables, see link:https://developers.thoughtspot.com/docs/rest-apiv2-reference#_variable_beta[Variable].
17+
18+
Note that for every variable you create, you must set the value for a user as either a value or list of values from the data set. You can also set the value as TS_WILDCARD_ALL, which assigns all values in the column. If you do not assign a value for a created variable, searches including row-level security rules for that variable will generate errors indicating that a mandatory variable has not been defined. This ensures that data is not leaked.
19+
20+
== Defining a row-level security rule with variables
21+
22+
Once you have created a variable and assigned values to a specific user, you can create a row-level security rule. Let’s say you created a variable, `publisher-name` for a data set referencing comic books. Your created variable limits a user to only see comics published by Marvel. This value is maintained in the column `publisher` in your data set.
23+
24+
To define a row-level security rule referencing this variable, follow these steps:
25+
26+
. Navigate to the table you want to define the rule for in the Data workspace. Click the *Row security* tab and select *+ Add row security*.
27+
28+
. Name your rule and click on the first row.
29+
30+
. Enter your rule. In this case, you would reference the column name `publisher` and the `ts_var` identifier. A good rule would be: `publisher = ts_var (publisher-name)`.
31+
32+
. You can log into ThoughtSpot as the user you defined the variable for, and test out your new rule. Any search on the table you set the rule for should reveal only the comics published by Marvel.
33+
34+
Note that we now support `and` statements in row-level security rules. For example, you could set a rule for a Sales table as `region = ts_var (region-name) and product = ts_var (product-name)`.

cloud/modules/ROOT/pages/security-rls-concept.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ NOTE: When Bypass RLS is checked on a Model, it applies to queries involving tab
4747

4848
This behavior is true regardless of whether the privilege is from a direct group membership or indirect (through a group hierarchy, where the user is part of a group that is part of a larger, top-level group with the RLS privilege).
4949

50+
[#examples-of-rls-rules]
5051
== Examples of RLS rules
5152

5253
An RLS rule evaluates against two system variables:

0 commit comments

Comments
 (0)