Skip to main content

Run database discovery as a restricted Windows service

SECTIGO QUANTUM READY · PLATFORM TRAINING

Run database discovery as a restricted Windows service

Loading video…

3:33 · English narration and captionsTranscriptDownload lesson

This lesson follows the database connection lessons. It adds the service-account boundary: an administrator prepares the installation, but a dedicated restricted identity performs discovery. The recording uses a disposable Windows Server 2025 host and a sample SQLite database. It does not establish a new Windows client release qualification.

Before you start​

  • Have workspace permission to enroll an agent and submit database jobs.
  • Use an elevated 64-bit PowerShell terminal on the target Windows host.
  • Download and verify the unified Windows package from the product's installation page. Keep it in a protected management cache, writable only by administrators and SYSTEM.
  • Choose the actual database target and obtain permission to inspect its metadata. A workspace capability does not grant access to the local database.

Enroll the database collector​

  1. Open Agents & sensors, then Enroll agent.
  2. Choose individual enrollment and Database cryptography. Give the device a recognizable name.
  3. Save its enrollment credential in a protected local file. Do not paste it into command-line arguments, shared scripts, logs, or screenshots.
  4. Review the agent's scanner permissions. Enable database discovery for this identity and configure its managed polling settings.

Use the separately enrolled database identity shown here. The current bulk-deployment grant does not admit the database capability; this walkthrough must not imply that it does.

Prepare the service's local policy​

Create a private policy using the documented sectigo.database-local.v1 schema and the workspace's tenant identifier. Each connection has a stable ID. A SQLite entry identifies one absolute file path, declares the SQLite runtime, and has no credential file.

Give NT SERVICE\SectigoQuantumReady read access to the policy and approved SQLite file. Administrators and SYSTEM retain control. The policy file must also have its own protected DACL: inheriting a restrictive directory ACL alone does not meet the private-policy check. Use the service-aware configuration workflow, or apply and verify the documented service-policy ACL. Before the service exists, use a numeric SID ACL rather than relying on account-name resolution. Ordinary users must not be able to replace the policy or database through a writable parent directory. Do not grant write access merely to make a metadata scan succeed.

For PostgreSQL, MySQL, and SQL Server, use the corresponding database connection walkthrough and the service-credential instructions. An administrator's interactive credential store is not interchangeable with the service's protected credentials. Keep optional tablespace, TDE, or column metadata disabled unless you deliberately grant and require it.

Install the signed service component​

The unified archive includes the compiled installer, signed service archive, manifests, signatures, and release key. The demonstrated individual-enrollment route invokes that component directly:

  1. Run the native installer's setup command with the protected configuration file and --token-file. Keep the endpoint set to your QScan service.
  2. Run install --distribution binary with the service manifest, signature, archive, approved verification key, expected version, and minimum release sequence from the installation guide.
  3. Remove the temporary enrollment input file after successful protected setup. The installed identity has its own protected storage.
  4. Run status. Confirm the service is running under its dedicated account and that its security checks pass.

The recording prepares argument arrays from these same values to keep terminal commands readable. From the protected package directory, the equivalent PowerShell structure is:

$installer = '.\installer\runtime\quantum-ready-service.exe'
$setupArguments = @(
'--endpoint', 'https://qscan.dev',
'--config', 'C:\QscanTraining\agent.json',
'--token-file', 'C:\QscanTraining\agent.token'
)
$releaseArguments = @(
'--distribution', 'binary',
'--manifest', '.\service\manifest.json',
'--signature', '.\service\manifest.sig',
'--archive', '.\service\sectigo-quantum-ready-windows-x86_64.zip',
'--trusted-key', '.\release-key.json',
'--version', '0.27.4',
'--minimum-sequence', '794'
)
& $installer setup @setupArguments
& $installer install @releaseArguments
& $installer status

The paths are examples for the protected training cache; adapt them to your management tool's protected cache and the current approved release. The secret stays in the protected input file, not in these argument arrays.

These parameters support unattended execution. They do not turn an unprotected cache into a trusted installation source. No Python installation is needed on the target host for the compiled service.

Submit and inspect the task​

  1. Return to the agent in the workspace. Verify recent contact, the expected compiled version, and database readiness.
  2. Submit a database job to this agent using the connection ID authorized in its local policy.
  3. Use Refresh latest on the scan list to read the current job state. Bring the status column into view, then open the resulting evidence once the job returns.
  4. Separate observed metadata from unknown or unassessed encryption properties. A partial result can contain useful evidence while honestly reporting coverage gaps.

The demonstration checks that its sample application row is absent from returned evidence and that the local file remains unchanged. It does not claim a SQLite metadata scan proves disk encryption, complete application encryption, or a database server's TLS configuration.

Retire a temporary collector​

Stop and remove the local service, then revoke and archive the temporary identity in the workspace. Local removal and cloud revocation address different parts of retirement. Review retention before deleting private configuration; the native removal workflow preserves it. The disposable demonstration VM is deleted after verification.

Recover from common problems​

  • Package is writable by untrusted accounts: move or deploy it into a protected cache and verify the directory ACLs. Do not weaken the installer check.
  • Service runs but database readiness is missing: inspect the configured policy path, tenant ID, connection schema, and service-account permissions.
  • Interactive scan works but the service fails: check the service's own credential context and access to the CA file or approved database file.
  • Unknown encryption evidence: read the engine-specific visibility limits. Do not convert missing evidence to a low-risk or successful encryption result.
  • Job does not progress: verify contact, managed configuration, capability approval, and the selected agent/connection. A running Windows service alone is insufficient proof.

Narration transcript​

We've already connected individual databases. Now let's make that discovery run as a Windows background service. By the end, you'll have a separately enrolled database collector, a local policy it can read, and a real result in the workspace. We'll use a disposable Windows Server machine and a small SQLite file. The same service account boundary matters when you configure server databases: your administrator login and the scanner aren't the same identity.

Start with an individual database collector. Give it a name that tells your team where it runs, choose database cryptography, and save the enrollment credential in a protected file. Don't put it in a command line or a shared script. This identity belongs to this device. The workspace allows database tasks, while the local policy decides which database that device may inspect. You need both approvals.

Before starting the service, prepare the local database policy. Here it names just one SQLite file. The directory gives administrators control and the dedicated scanner identity read access. Ordinary users can't change the policy or replace its target. There's no database password in this example. For PostgreSQL, MySQL, or SQL Server, configure credentials for the service identity using the database instructions, rather than copying an interactive user's credential store.

We're using the signed service component from the verified unified Windows package. The setup command takes the protected configuration and enrollment file. The install command then verifies the signed manifest, archive, approved release key, version, and minimum sequence before registering the service. These are silent installation parameters, so you can deliver them through your management system. Keep the package in a protected cache. A writable download folder isn't an appropriate installation source.

Now check the service status. Running is useful, but it doesn't prove that database discovery works. Confirm the dedicated service account and security checks, then return to the agent in the workspace. Look for recent contact, the expected compiled version, and database readiness. If readiness is missing, check the policy path and the service account's access before submitting a job. Granting administrator privileges would hide the problem instead of fixing the scope.

Let's submit the database task to this specific collector. Select the connection authorized by its local policy and start the scan. Follow the job until it returns a result. This is a real metadata task against our local sample file. We deliberately put a private application row in that file, so the verification can check that discovery leaves it unchanged and doesn't upload the row.

Open the resulting database evidence. The engine and metadata tell us what was observed. Encryption fields may remain unknown or not assessed; that doesn't mean the file is safely encrypted, and it doesn't mean discovery failed. A SQLite metadata inspection has a specific visibility boundary. Use the related SQLCipher and server database lessons when those engines are what you need to assess.

That completes the Windows service path: a distinct enrolled identity, a restricted local policy, a verified native installation, and a real database result. For this temporary demonstration, we stop and remove the service, then revoke and archive its identity. Removal and cloud revocation solve different parts of retirement. For a permanent collector, keep the service installed and continue with rollout policy, monitoring, and the database-specific permission checks.