Identities, permissions, and least privilege
Manage the five types of accounts involved in a task separately, with clear responsibilities, authorization methods, and verification methods. Assess allowlists along the connection path. When connecting through taosAdapter, the source address may appear as the Adapter host. Successful configuration does not mean end-to-end source access is controlled.
Where to operate: TDengine user and permission management; source system authorization; operating system service accounts; the taosX privileges CLI.
Grant each identity only the permissions needed for its responsibilities, and verify them with actual tasks. Successful ingestion with an administrator account is not a reason to use that account as the production identity for all tasks.
1. Distinguish five identities first
| Identity | Responsibility | Configuration and checks |
|---|---|---|
| TDengine TSDB administrator | Create databases and tables, manage Xnodes, and grant permissions by responsibility | taos CLI or taosExplorer; check management SQL permissions against SQL management |
| Xnode management connection identity | Access taosd over the management connection | Xnode registration and authentication; not the agent Token |
| Source read identity | Read topics, points, tables, or historical data | Source systems such as Kafka, OPC, PI, and databases; verify on the actual collection host under the service identity |
| Target write identity | Write data and, depending on the mode, create databases and tables or update tags | Task target DSN; permissions can be narrowed as needed if an administrator precreates structures |
| Operating system service account and agent identity | Read plugins, certificates, and configuration, write logs and caches; connect the agent to taosX | Manage host ACLs/directory permissions and agent.toml separately |
2. Authorization walkthrough
- List actual source and target objects. Determine whether the task automatically creates tables, reads metadata, subscribes, or changes tags.
- Have the source system administrator grant read access to the specified objects, and an authorized TDengine TSDB administrator prepare target structures and grant operation permissions. Use Authentication and authorization for complete syntax. Do not copy permission statements across versions without checking them.
- Let service accounts read only required plugins, configuration, and certificates, and write only specified log, data, cache, and backup directories. Control access with file ACLs on Windows and ownership, groups, and necessary permissions on Linux. Do not make everything writable by everyone.
- Run a limited sample using the production service identity, and check reads, writes, and necessary table creation. Success under an interactive login account does not replace service identity verification.
- Verify that operations outside the authorized scope are rejected as expected. Save the authorization scope and account owner, not plaintext passwords, in diagnostic records.
In Enterprise taosExplorer versions that support this capability, an administrator with the required grant permissions can configure CREATE and SHOW separately under Xnode task permissions when creating or editing a user in user management. These correspond to CREATE XNODE TASK and SHOW ON XNODE TASK *. The Data In page controls task viewing, creation, and import according to the user's effective permissions. If the task list is empty or a button is unavailable, check permissions and filters before investigating nodes and connections.
The v3.4.4.2 behavior changes state that newly created Enterprise users are not granted either task permission by default. Select them explicitly according to responsibilities, and check existing users' effective permissions and role inheritance separately. This version record does not mean every older interface has the same controls or defaults. Check task management authorization separately from source reads, target database writes, and xnoded management connection credentials. Granting CREATE or SHOW does not automatically provide target database permissions.
Assess allowlists along the connection path: when connecting through taosAdapter, the database may see the Adapter host's address rather than the browser or original client address. Successful allowlist configuration does not establish end-to-end client source control.
3. Migrate users, privileges, and allowlists
taosx privileges migrates between endpoints, or exports identity materials to a file for later import. It does not migrate business table data and does not replace a database backup. Exports contain sensitive identity materials and must be protected as secret files. Approve target account conflicts and permission changes in advance.
See the CLI reference for the three valid combinations. Before execution, record users, grants, and allowlists on both source and target. Confirm that versions and permission models allow migration, and verify in isolation before applying it to production. This command does not guarantee complete migration of users, privileges, and allowlists across arbitrary versions and role models.
Scope flags are --users, --privileges, and --whitelist. When none is selected, all default scopes are used. When some flags are selected, only those scopes are migrated. Allowlists depend on user materials; selecting --whitelist alone does not replace --users --whitelist. --input is a file path, not a database address.
4. Required post-migration verification
Check that target users match the plan, grants are neither too broad nor missing, and source allowlists match the new topology. Then verify allowed and rejected operations using target identities. If migration fails or succeeds only partially, save item-by-item results. Do not repeat a full import over an unknown state. Restore original grants under the approved plan. Determine retention and destruction responsibilities for the original export files separately.
When a task reports a permission error, use the full error to distinguish source reads, target writes, management connections, and file ACLs. Do not fix it by making every account an administrator. See Troubleshooting by symptom for investigation steps.
5. Update credentials after a database password change
After ALTER USER ... PASS, the server detects and closes connections created with the old password on heartbeat. Subsequent requests return 0x80000357. The connection performing the change and Token connections are unaffected. Rotate or revoke Tokens separately if needed.
Follow Password Change Impact and Remediation to update every component, task, and external system still using the account. Some interruptions produce no visible error, so a successful current login is insufficient verification.
- Sign in to taosExplorer with the new password. Update other clients, applications, and scripts, then reconnect.
- If taosKeeper uses the account, update
[tdengine]usernameandpasswordin/etc/taos/taoskeeper.toml, or the startup options--tdengine.usernameand--tdengine.password, then restart the service or container. Enterprise auditing uses the same credential and needs no separate configuration. When changing therootpassword, check taosKeeper in particular because it uses that account by default. - If
xnodeduses the account, update its cluster-wide credential withALTER XNODE SETas described in Change authentication and deregister. This restartsxnodedand briefly interrupts tasks. Do not repeat it or substitute deleting and recreating nodes. - Check every data ingestion, data delivery, backup/restore, and dual-active replication task. For ordinary tasks, signing in with the new password still requires checking and updating the actual saved source and target credentials. The dual-active editor loads and submits the saved
FROMandTOunchanged; signing in again and clicking Save does not replace passwords automatically. Stop the original task within a maintenance window, explicitly replace the real credentials in affected DSNs, and preserve the protocol, addresses, ports, databases, and both the values and presence or absence of synchronization parameters. Save and start the original task. Do not enter******as a new password. Do not delete and recreate dual-active tasks: deletion cleans up subscription resources, and recreation does not inherit progress. Signing in again or updating the daemon credential alone does not rewrite saved task connection strings. - Update connection settings for Grafana/TDinsight data sources, Telegraf and other collectors, applications, JDBC/ODBC connectors, BI tools, and script tools such as
taosdumpandtaosBenchmarkthat use the account.
Verify that taosKeeper writes resume, component data reappears on the monitoring page, affected nodes show online in SHOW XNODES;, all task types run with expected target data, and external connection tests pass.