Skip to main content

TLS, DSNs, and sensitive files

info

This page explains the roles and limits of TLS, file permissions, and DSN protection, along with configuration locations and verification points for each connection. Check every segment in the actual connection direction. Changing only the browser address is insufficient, and ignoring certificate validation is not a valid way to pass verification.

Where to operate: configuration and certificate management on taosX, taosExplorer, taosAdapter, taosd, and agent hosts.

TLS protects transport, file permissions protect secrets on the host, and DSN protection reduces exposure of sensitive values in specific management output and runtime distribution. They serve different purposes and do not mean that all configuration and backups are encrypted at rest.

1. Configure each hop, not just the browser address​

ConnectionConfiguration locationVerification
Browser → ExplorerExplorer HTTPS and certificatesThe browser uses a trusted name without certificate errors
Explorer → taosX HTTPssl_cert, ssl_key, and ssl_ca in taosX [serve], and the Explorer backend addressVerify the certificate chain and actual API connection from the caller
xnoded → taosX gRPCAn https:// Xnode registration URL, taosX gRPC certificates, and xnoded --rpc-ca-cert or XNODED_RPC_CA_CERTVerify the certificate chain, access name, and task dispatch from the actual management daemon; an untrusted server certificate or mismatched name must fail
Agent → taosX gRPCtaosX grpc_ssl_cert, grpc_ssl_key, and grpc_ssl_ca; agent HTTPS endpoints and CAVerify from the agent host; both agent and tasks work normally
taosX → taosAdapterTarget DSN uses an actual TLS-enabled taos+wss:// endpointTasks read and write successfully, and data is checked
External source → collection processSecurity settings of the relevant connectorCheck authentication, server identity, and actual collection according to the source protocol

Do not apply a single tls.enabled field to every source. Kafka, MQTT, OPC UA, and other sources have different security mechanisms and parameters. OPC UA certificate trust and message security are not achieved simply by changing the endpoint to HTTPS.

xnoded connects to taosX gRPC using the registered Xnode URL. An address without a scheme, such as taosx-host:6055, is prefixed with http:// and does not enable TLS. For TLS, register https://taosx-host:6055 and configure a trusted CA on the management side. In the current implementation, HTTPS without --rpc-ca-cert or XNODED_RPC_CA_CERT encrypts the connection but does not verify the server certificate. That is insufficient for security verification.

Managed xnoded inherits the process environment of the taosd that launches it. On hosts that may run the daemon, set XNODED_RPC_CA_CERT=/etc/taos/certs/ca.pem in the actual taosd service or container environment and ensure its service account can read the file. This is not a taos.cfg field. For a separately launched daemon, use --rpc-ca-cert /etc/taos/certs/ca.pem. After adding or changing the taosd startup environment, restart the corresponding taosd service or container within a maintenance window and confirm that the new xnoded inherits the setting. RESTART XNODE alone does not refresh the environment of an already running taosd. Then verify registration, task dispatch, and rejection of an untrusted server certificate or mismatched name. The agent CA setting does not configure this management connection.

2. taosX certificate snippet​

The following illustrates configuration on a Linux taosX host. Files are supplied by the security administrator; replace paths with actual values. On Windows, use absolute paths readable by the service, such as the TOML literal string 'C:\TDengine\certs\server.pem'. When no separate gRPC certificates are specified, the HTTP certificate configuration can be reused. When specified separately, check both sets of certificates.

[serve]
ssl_cert = "/etc/taos/certs/server.pem"
ssl_key = "/etc/taos/certs/server-key.pem"
ssl_ca = "/etc/taos/certs/ca.pem"
grpc_ssl_cert = "/etc/taos/certs/grpc.pem"
grpc_ssl_key = "/etc/taos/certs/grpc-key.pem"
grpc_ssl_ca = "/etc/taos/certs/ca.pem"
warning

Certificate names must match the DNS names clients use. The service identity must be able to read private keys, and callers must trust the issuer chain. Before making changes, save the original configuration and arrange an interruption window. Restart components that need to apply changes according to the deployment method, then check TLS, identity connections, and business samples in that order. Do not ignore certificate validation or fall back to plaintext to pass verification. See Transport security for the complete connection path.

3. Secrets in DSNs and files​

DSNs may contain usernames, passwords, Tokens, and certificate materials. URL encoding resolves syntax ambiguity; it is not encryption. Terminal history, process command lines, service definitions, task exports, and logs can expose these values. Putting a password in an environment variable before inserting it into a command line does not remove the risk of exposure through process arguments.

Where a connector supports @文件, follow the exact rules for that field. Do not assume all DSN values support it. File paths refer to the host of the process that actually reads the field. In agent scenarios, pay particular attention to the collection host and data directory. For example, Kafka keytab file resolution differs from general CA file handling. See Kafka.

Backup chains, persistent queues, archives, and raw-data retention may contain business data. Task exports and identity migration files may contain credentials. Control directory ACLs, copying channels, and retention according to data sensitivity. Diagnostic files must follow the same requirements.

4. Deployment boundaries of Xnode DSN protection​

Linux supports shared RSA-2048 keys to protect specified management output and runtime distribution. Configure xnodeDsnProtection, xnodeDsnPublicKeyFile, and xnodedDsnPrivateKeyFile in taosd, xnode_dsn_private_key_file in Explorer, and the same private-key path setting in taosX [serve].

Deploy the public key to nodes that may run an mnode. Deploy the same private key to Explorer, management daemon, and taosX hosts that need to read it. Paths may differ by host, but contents must match. Keys are not copied automatically, and this does not change how DSNs are stored on the server. The private key uses PKCS#8 PEM and the public key uses SubjectPublicKeyInfo PEM. See Xnode DSN protection for generation, distribution, and rollback procedures.

Enabling protection, replacing keys, or rolling back requires a coordinated maintenance window for related component versions and restarts. Hot reload, partial-instance rotation, and mixed-version operation are not supported. Do not enable this feature on Windows or copy the Linux key deployment to bypass the platform restriction.

After enabling it, check that sensitive values in SHOW XNODE TASKS; and SHOW XNODE JOBS; output are redacted, and verify actual tasks. ****** in output is not a real password that can be used directly for command-line authentication. A mask in a management update may mean retaining the original value; it is not a general way to recover secrets. Ordinary task exports may retain these masks, which cannot recover credentials when importing or copying creates new tasks. Back up real credentials separately under controlled access and restore them before import; do not disable protection to obtain secrets. See Export and import tasks for the procedure.

5. Troubleshooting​

For certificate identity validation boundaries in S3 dump and restore, see Data backup and restore in the operations guide. Do not treat this taosX server certificate configuration as a guarantee of S3 client identity validation.

For TLS failures, check the access name, validity period, certificate chain, and service read permissions first. If the agent endpoint protocol does not match the listener, correct the configuration instead of only retrying the Token. For DSN protection failures, first check every instance's version, key contents and paths, and whether services were restarted. Retain errors without outputting private keys. For support, provide necessary materials according to Diagnostic packages and support tickets.