Skip to content
Open

S u a #399

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions modules/ROOT/pages/abac_rls-variables.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ To define RLS rules with variables for a Table:

. Navigate to the Data workspace and click the Table for which to define RLS rules.
. Click *Row security* and then click *+ Add row security*.
. In the *Row Security Editor*, define the rules. To reference the formula variable in the rule, use the `ts_var` function. For example, If you want to limit user access to data of a specific region, you can create a region-specific variable, `region = ts_var('region_var')`, and assign values in the token request.
. In the *Row Security Editor*, define the rules. To reference the formula variable in the rule, use the `ts_var` function. For example, If you want to limit user access to data of a specific region, you can create a region-specific variable, `region = ts_var(region_var)`, and assign values in the token request.


=== RLS rule with a single variable reference

In this formula example, `country` refers to the "country" column in the data table, and `country_var` is the variable.

----
country = ts_var('country_var')
country = ts_var(country_var)
----

If `country_var` is assigned a single value, the user is permitted to view only rows where the `country` column matches that value.
Expand All @@ -130,20 +130,20 @@ The RLS rules support the `AND` operator, which means that you can combine multi
The following rule restricts data access to rows if the `country` column in the data table matches the value assigned to `country_var` and the `Department` column matches the value assigned to `department_var` for that user.

----
country = ts_var('country_var') AND Department = ts_var('department_var')
country = ts_var(country_var) AND Department = ts_var(department_var)
----

The rule in this example restricts data access to rows where the `region` column in the table matches the value assigned to `region_var` and the `product` column matches the value assigned to `product_var`.

----
region = ts_var('region_var') AND product = ts_var('product_var')
region = ts_var(region_var) AND product = ts_var(product_var)
----

=== Allow all rule with a TS_WILDCARD_ALL variable
In this example, `customer` represents the column `customer` in the table and `customer_var` represents variable. If the value of the customer_var variable is set to `TS_WILDCARD_ALL`, the user can access all customers in the column.

----
customer = ts_var('customer_var')
customer = ts_var(customer_var)
----

=== Group override rule with variable-based check
Expand All @@ -152,21 +152,21 @@ In any security formula you build, you may want a clause that gives access to al
In this example, users can access data if they are in the "data developers" group, or if the `Department` column matches the value assigned to their `department_var` variable.

----
'data developers' in ts_groups OR Department = ts_var('department_var')
'data developers' in ts_groups OR Department = ts_var(department_var)
----

==== Variables with numeric and Date data types

The following rule enforces a numeric threshold and restricts access to rows where the Revenue value is less than or equal to the value provided by the `revenue_cap_var` variable.

----
Revenue <= to_double(ts_var('revenue_cap_var'))
Revenue <= to_double(ts_var(revenue_cap_var))
----

The following rule restricts access to rows where the `date_column` is within the range defined by the `start_date_var` and `end_date_var` variables. Only rows with dates greater than or equal to the start date and less than or equal to the end date specified for these variables will be visible for the user.

----
(date_column >= ts_var('start_date_var')) AND (date_column <= ts_var('end_date_var'))
(date_column >= ts_var(start_date_var)) AND (date_column <= ts_var(end_date_var))
----

== Create an ABAC token request with variable attributes
Expand Down
13 changes: 11 additions & 2 deletions modules/ROOT/pages/about-rest-apis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,20 @@ ThoughtSpot users with Developer or Administrator privileges can access the REST
* To try out the xref:rest-api-v1.adoc[REST API v1 endpoints], click **REST Playground v1**. +
* To access the xref:rest-api-v2.adoc[REST API v2 Playground], click **REST Playground v2.0**.

== Rate limits for API requests
To ensure API stability, optimize resource usage, and maintain service quality for all users, ThoughtSpot limits the number of public API requests allowed per client to prevent excessive requests from reaching application servers.

By default, on instances running 26.2.0.cl and later, a global rate limit of 100 requests per second per client IP is enforced at the cluster level for all public APIs. This limit is applied per client IP across all public APIs combined, not per endpoint. If a client IP exceeds this combined rate limit, a burst of 10 additional API requests is allowed before rejecting the requests with the 'HTTP 429: Too Many Requests' error.

For async status endpoints such as `/api/rest/2.0/metadata/tml/async/status`, up to 100 requests per minute per client IP are allowed, with a burst of 100 requests before requests are rejected with an HTTP 429 error.

These rate limits are enforced by default on all ThoughtSpot instances. Currently, rate limits are applied at the cluster level; Org-level rate limits are not supported.

ThoughtSpot administrators can monitor logs, add or update rate limits via TSCLI, and adjust these settings for different environments (dev or prod) as required.

== API endpoints
For a complete list of API endpoints and information about how to make an API call to these endpoints, see the following reference pages:

* xref:rest-api-reference.adoc[REST API v1 Reference]
* xref:rest-api-v2-reference.adoc[REST API v2.0 Reference]

////

Loading