← Back to Technical blog

Technical article

After the Model Writes SQL: Four Row-Level Security Checks in Conversational Analytics

Verify discovery, server-side access, aggregation, and output with the same roles across dashboards and ChatBI.

Dec 1, 2026Technical blogHENGSHI7 min read
Data AgentChatBI

Article body

Full article

A regional manager who moves from a dashboard to ChatBI should still see only authorized data. Questions can add new groups and filters, so test results, totals, and follow-ups. The four verification points are data discovery, server-side authorization, aggregation, and output. Actual settings use the HENGSHI SENSE 7.0 product interfaces.

Four permission boundaries to verify

BoundaryCheckVerify
DiscoveryAvailable applications, packages, and subject areasCompare a regional account’s choices with its grants.
Data accessPermission mode and row and column enforcementUse two accounts on the same object and field.
AggregationAuthorized inputs for counts, amounts, and rankingsRecalculate detail, totals, and charts with a small sample.
OutputProduct page, host, and export presentationCheck real recipient access and manage logs independently.

Optional scope chooses among authorized objects. A region in a question expresses intent. The server verifies access for standalone ChatBI, the sidebar, and the host. Pass an authenticated identity through a supported integration. Page parameters can identify an object, while platform permissions control the result.

Set permissions where they take effect

With application-author or dataset-author permissions, application managers can set row and column rules per dataset. Rows can use supported field types and comparisons with user attributes or parameters. With consumer permissions, the signed-in user’s data connection grants determine visibility. The application manager cannot set these dataset rules in that mode. Check the mode before investigating application rules, connection settings, or mapping.

Test organizational authorization and fact cardinality for multiple regions, shared stores, or management levels. Duplicate matches for one person or store may duplicate aggregation. Test visibility and metrics together. If a fact table lacks an appropriate organization field, prepare a governed dataset before enabling questions. Verify sensitive column restrictions and the suitability of derived metrics under separate ownership.

Verify row rules on derived datasets

Order headers in dataset A and products in B support derived dataset C and a sales chart. Row rules on A and B do not automatically propagate to C. Check the actual mode for ChatBI, charts, and exports using C, and configure separate row rules where needed. Trace each consumer from the visible chart to the metric and source.

An East China manager with grants for Shanghai and Hangzhou may also match another group or organization rule. Row rules for the same user and dataset are combined as a union, and row scope and column scope apply together. Test distinctive orders by store and reconcile each store, the total, and sensitive fields.

Use the same roles across questions, dashboards, and delivery

User and entryExpected resultEvidence
Regional manager queries the derived package.Authorized store totals and restricted fields hidden.Role, query scope, package, and baseline
The manager opens the published dashboard.Results match under the same filters.Published version, filters, and role screenshot
Headquarters analyst views several authorized regions.Store and total figures match authorized access.Matched rules, visible regions, and samples
Regular user queries from a host.Host identity and target app permissions apply.Mapped identity, application, and reproducible sample
Administrator changes organization access.New queries use revised grants.Change record, time, and before-and-after results

Review results with the data and permissions owners. For inflated amounts, check dataset, cardinality, and matched rules. If a dashboard is correct while a static subscription attachment covers a different scope, verify the identity generating it and recipient settings. Retain regression samples for future changes.

Reconcile totals against authorized rows

Suppose East China has CNY 1 million and South China has CNY 600,000 in orders. The East China-only account should see CNY 1 million. A total calculated as CNY 1.6 million still exposes incorrect scope if South China details are hidden. Verify totals, distinct orders, rankings, and drill-down independently.

Permission acceptance example
Role       East China manager with East China access only
Question   What was this month's value of valid orders by category?
Baseline   CNY 1 million using authorized orders
Verify     Total, distinct orders, rankings, and drill-down

This independent baseline tests observable behavior even if generated query text cannot be shown. For aggregate datasets, verify two permission perspectives. For user-dependent access, check that shared aggregates are suitable or test direct connections and real-time filtering. Compare the same role and filters on the HENGSHI page and its host, including tenant mapping, application grants, and field scope. Retest old links as permissions change.

Retest identity and permissions using trace evidence

Compare a group account, an East China account, an unauthorized account, and an authorized host identity. Follow up by category, then test role changes and grants being revoked. Verify export and subscription recipient scope from the actual interfaces. In multi-tenant deployments, read back rules in each tenant with real identities.

Use processing traces to locate used objects, calls, and errors. System logs record the actor, object, and outcome for supported actions. During acceptance testing, correlate those records using the conversation, time, account, and data resource identifiers. Control access to evidence separately. A denial message can explain current visibility and where to request access. Reuse the same questions in dashboards and hosts to catch differences in identity and aggregation.

About HENGSHI

Founded in 2016, HENGSHI builds enterprise analytics for the Data+AI era. Its Agentic BI offerings bring together HENGSHI SENSE, HENGSHI digital employees, the HENGSHI CLI execution engine, and HENGSHI BOX for private deployment. With ten years of BI experience, HENGSHI supports software vendors through Powered by Hengshi and provides integrated AI analytics for manufacturing, finance, retail, and government.

HENGSHI SENSE

Resources, ecosystem, and implementation stories

Explore how teams design and ship analytics with HENGSHI.

Request a trial

Enterprise deployment, embedded delivery, and trial requests can all be handled quickly.