Skip to main content

Run database discovery as a restricted Linux service

SECTIGO QUANTUM READY · PLATFORM TRAINING

Run database discovery as a restricted Linux service

Loading video…

3:47 · English narration and captionsTranscriptDownload lesson

This lesson follows the database connection lessons. It covers the extra authorization and lifecycle checks required when the collector runs under a dedicated service account instead of your interactive login.

What this task demonstrates​

Enroll a database-capable agent, prepare its private local policy, install the signed native service, dispatch a SQLite metadata job, inspect the resulting evidence, and retire the temporary deployment.

The demonstrated host is an owned disposable Ubuntu 24 x86_64 guest. The sample database contains a test-row canary. Neither the guest nor that sample represents a production database. The control-plane enrollment, heartbeat, job and evidence are real. The service uses native version 0.27.4 from unified package 0.51.512.

Before you start​

Use an administrator account to install the service. Give the service itself only the access required for the chosen database. Have a workspace role that can enroll agents and dispatch scans. Download the package from the workspace and verify its published checksum. Keep the enrollment token, local credentials and policy in protected files. Do not paste secrets into shell command arguments, screen recordings, tickets or chat.

The current bulk-deployment authorization rejects the database capability. This walkthrough uses a separately enrolled database agent and the signed component installer supplied inside the unified archive. It does not demonstrate database enrollment through a bulk grant.

Prepare the local policy before starting the service​

  1. Open Agents & sensors ? Enroll agent ? Advanced: enroll an individual agent. Select Database cryptography, name the collector, and save its masked token to a protected file. Continue to scanner approvals and the linked database-policy guide.
  2. Create or confirm the non-login service identity, sectigoqr.
  3. Create a private policy directory readable by that identity. The example uses mode 0700 for the directory and mode 0400 for the sample database and policy.
  4. Use the sectigo.database-local.v1 policy format. Set the workspace tenant ID and assign a connection ID. The cloud task will reference this connection ID; it does not supply an arbitrary local path.
  5. For this SQLite example, map the connection ID to the absolute sample database path, set the runtime to sqlite, and leave tablespace, TDE and column collection disabled.
  6. Set databasePolicyFile in the agent configuration to that private policy. Leave unrelated network, SSH and repository scopes empty.

For PostgreSQL, MySQL, SQL Server and cloud variants, follow the corresponding engine lesson for the target and credentials. Confirm that the service identity can read the protected credential file. Your personal login's access does not automatically apply to a background service.

Python is used only to display formatted JSON in this demonstration. The installed agent is the compiled native package and does not require a system Python interpreter.

Install and verify​

Use the package's native component installer with the supplied manifest, signature, archive and trusted release key. Include the expected version and minimum sequence, and pass the configuration and enrollment token as protected files. The installation validates the signed release. Do not disable that validation to work around a failed download or mismatched package.

Inspect Deploy-QuantumReady.sh status. Confirm that the service is active and reports the expected version and sequence. Inspect the service manager's user and process identity. This demonstration also verifies that Linux capability sets are empty and NoNewPrivileges is enabled.

Wait for a fresh heartbeat and database readiness in the workspace. Availability is distinct from successful database access; the next step checks the database itself.

Dispatch and inspect the database task​

Choose the enrolled agent and submit a database scan using the policy's connection ID. Follow the job until it reaches a terminal state. Open the resulting asset and observation metadata.

The demonstrated result is partial, with one accepted observation. The SQLite runtime was observed and the schema was readable. The cipher probes were unsupported, storage encryption was not-assessed, and key establishment and authentication remained unknown. Those values are evidence limitations, not a passing security assessment or a zero-risk score.

The test verified that the sample file's hash remained unchanged and that the test-row canary did not appear in the returned evidence. It does not claim exhaustive inspection of every database page or every possible database permission.

Retire the temporary deployment​

Remove the test service, verify that it is no longer active, and revoke and archive its workspace agent identity. Service removal and cloud revocation are separate operations. Delete the owned disposable guest and its private preparation files after retaining the non-secret acceptance evidence.

For a permanent deployment, manage policy and credential files through your normal protected configuration process. Keep the signed update path and the workspace's revocation controls available.

Recover from common problems​

  • No authorized local scope at startup: create and validate the database policy before starting the service. Do not grant unrelated network or repository access just to make startup pass.
  • Works interactively, fails as a service: check directory traversal and file-read permissions for the service identity, plus engine-specific database grants. Do not run the collector as root as a shortcut.
  • No heartbeat: inspect service status and outbound connectivity. A running process alone does not prove the workspace can see it.
  • Connection ID rejected: compare the task's identifier with the local policy and workspace tenant ID.
  • Partial metadata: read the probe statuses. Unsupported or missing evidence remains unknown; use the appropriate engine-specific checks rather than interpreting a partial result as complete coverage.
  • Bulk authorization rejects database capability: use the individual enrollment path documented here until that distinct product gap is resolved.

Narration transcript​

Let's turn a Linux database collector into a managed service. By the end, you'll have a restricted service identity, a private database policy, and a scan dispatched from your workspace. This builds on the earlier database connection lessons. We're using a disposable Ubuntu host and a sample SQLite database, so you can see the entire lifecycle without touching a production database.

Start by enrolling a database-capable agent in your workspace. Keep the enrollment token private. For this lesson, we're using the signed component installer supplied inside the unified package. There's a current limitation worth knowing: bulk deployment authorization doesn't accept the database capability yet. Use this individual enrollment path for the database service, rather than trying to force that unsupported bulk configuration.

Before starting the service, give it something specific that it's allowed to inspect. Here, the non-login service account can read one database file and its private policy. The policy maps our connection identifier to that local path. It doesn't authorize a subnet, a repository, or any other database. For a network database, you'd instead use the engine-specific connection and credential settings from the earlier lessons, with permissions granted to this service identity.

Now install from the verified package. The component installer checks the signed release and the minimum release sequence. We pass the private configuration and token as files, rather than typing the token into the terminal. Notice the order: the local policy exists before the service starts. Without an authorized local scope, startup is supposed to fail. That's a useful guard, not a reason to grant the agent broad access. The manifest identifies the release, and the detached signature lets the installer verify who published it. The archive contains the actual agent files. Keep those files together with the trusted release key from your verified package. The minimum sequence is an anti-rollback boundary. If any of these checks fails, stop and correct the package; don't bypass verification to get the service running.

Check both sides. On the host, the native service is active under its restricted account. In the workspace, wait for a fresh heartbeat and database readiness. Those checks tell us the collector is available; they don't prove a database scan succeeded. We'll test that separately. Also, a service account has its own file permissions. A database you can read in your personal terminal may still be inaccessible to the service.

Choose the enrolled collector, enter the connection identifier from the local policy, and start the database scan. The cloud sends the task, while the agent resolves that identifier against its local authorization. Watch the job move to a terminal state, then open its evidence. In this example, the result is partial. Don't turn that into a clean bill of health just because the collector returned an observation.

Here's what we actually learned: the SQLite runtime was observed, and the schema was readable. Storage encryption wasn't assessed, and these cipher probes aren't supported by this runtime. Unknown means we still need evidence. The collector returns cryptographic metadata, not table rows. Our test also checks that the database file stayed unchanged. Use the earlier SQLCipher lesson when you need to inspect that specific encrypted SQLite configuration.

You've now connected a restricted Linux service to the workspace, dispatched a database task, and read the limits of its evidence. We're removing this temporary service and revoking its agent identity, then deleting the disposable host. For a permanent deployment, keep the protected policy and credential files under your normal configuration management. Next, we'll carry the same separation of identity, local authorization, and cloud orchestration into the other operating systems.