Scan PostgreSQL from a Mac and interpret partial evidence
Scan PostgreSQL from a Mac and interpret partial evidence
Loading video…
Connect one approved PostgreSQL database to a native macOS agent, queue a workspace job, and follow its evidence into inventory. This follows macOS installation and database authorization on macOS. The task ends with reviewed evidence, not merely a saved connection form.
Recording environment: a real Apple Silicon Mac runs the shipped native collector against an isolated PostgreSQL 16 lab on another machine. The workspace, job queue and evidence ingestion are real. The temporary database has a login-only reader and a private application table that is not granted to that reader. No provider API or database response is mocked. The container, temporary credentials and Mac scratch directory are removed afterward; the disposable agent is revoked and archived. This is a foreground collector walkthrough, not a demonstration of a managed macOS service.
Prepare the approved connection
Before opening the wizard, obtain these values from the database and network administrators:
| Value | What it controls |
|---|---|
| Certificate hostname | The server identity that certificate verification must match. |
| Approved destination IP | The destination the local authorization permits the collector to contact. |
| Port and database name | The particular database endpoint to inspect. |
| CA certificate file | The trust anchor for this connection. Obtain it through your trusted administrative channel. |
| Metadata-reader account | The limited database identity used for metadata collection. |
| Workspace and agent | The tenant receiving evidence and the Mac holding the local authorization. |
The lab certificate names localhost, while the connection goes to the lab server's LAN address. That is an intentionally controlled fixture. Do not copy those values into production. Use your own certificate hostname and approved destination. A certificate identity and an IP allowlist answer different questions; both must be correct.
Use a dedicated account with only the metadata access required for your chosen checks. The recorded account can log in but cannot read the private application table. Some PostgreSQL settings remain unavailable to this role. That limitation is retained in the result rather than erased by granting database-administrator privileges.
Create the local authorization on the Mac
- Use the verified unified macOS package from your workspace's enrollment flow. Complete enrollment for an agent with database capability. Keep the token in the protected file supplied by that flow.
- Open a terminal in the extracted package directory. Create a private configuration directory owned by the account that runs the collector. Do not put credentials in a shared downloads folder or source repository.
- Run the native wizard, substituting your actual directory and tenant ID:
umask 077
mkdir -p "$HOME/.qscan-database"
chmod 700 "$HOME/.qscan-database"
./agent/runtime/quantum-ready database configure \
--directory "$HOME/.qscan-database" \
--tenant YOUR_TENANT_ID
- Choose
postgresql. Enter the certificate hostname, approved destination, port, database name and absolute CA-file path. - Enter the dedicated reader username. Enter and confirm its password at the hidden prompts. Avoid putting it in shell arguments, chat, screenshots or a script committed to Git.
- Review and save the local authorization. Record the returned connection identifier. The workspace needs that identifier, not the database password.
- List and validate the policy using the same tenant:
./agent/runtime/quantum-ready database list \
--policy "$HOME/.qscan-database/database-policy.json" \
--tenant YOUR_TENANT_ID
./agent/runtime/quantum-ready database check \
--policy "$HOME/.qscan-database/database-policy.json" \
--tenant YOUR_TENANT_ID
A valid configuration is a prerequisite. It does not establish that a network connection or metadata scan has succeeded.
Connect the policy to the enrolled agent
Set databasePolicyFile in the agent's configuration to the absolute path of the policy you just created. Preserve the rest of the configuration, including any approved transport or relay settings. Keep the policy and its credential material accessible only to the intended service or foreground account.
Run the native diagnostics with the existing configuration and protected enrollment-token file:
./agent/runtime/quantum-ready doctor \
--config /absolute/path/to/agent.json \
--token-file /absolute/path/to/agent.token
The demonstration runs the collector once to advertise its database readiness, queues the job, then runs it again to consume the job:
./agent/runtime/quantum-ready agent --once \
--config /absolute/path/to/agent.json \
--token-file /absolute/path/to/agent.token
A normally running collector polls according to its configuration. Do not launch a second foreground collector against the same identity while its managed service is already running. This recording uses a separate disposable foreground identity and does not modify the Mac's existing services.
Queue the workspace scan
- Open Discovery and create an agent scan.
- Enter a name that identifies the database and purpose.
- Choose the database scan type.
- Enter the local connection identifier from the wizard. Do not enter a password or connection string in this field.
- Search for and select the Mac that owns the policy. An agent on another machine does not automatically gain access to that authorization.
- Review the agent, scan type and connection identifier, then submit.
- Allow the collector to take the queued job. Inspect its terminal status and observation count. A queued job alone is not a successful scan.
Interpret the returned evidence
The recorded job returns one database observation with partial coverage. Open the corresponding asset in inventory and expand its evidence.
| Recorded result | Interpretation |
|---|---|
| Session encrypted; TLS 1.3 | Encryption was observed for this collector session. |
TLS_AES_256_GCM_SHA384, 256 cipher bits | The observed session cipher; this alone does not prove PQC key establishment. |
| Certificate verified and destination pinned | The connection satisfied its configured identity and destination checks. |
Key establishment and authentication unknown | These cryptographic dimensions were not established by this evidence. Do not convert them to a pass. |
Server settings coverage partial | Several settings were unavailable to the limited role. Some version-specific fields were not applicable. |
Storage encryption not-assessed | This scan does not establish encryption for disks, backups or application fields. |
The connection also reports its SCRAM-SHA-256 authentication policy. That does not replace the separate top-level cryptographic authentication classification, which remains unknown in this observation. Read fields in their stated scope rather than treating one as proof of another.
Use the evidence to decide what to investigate next. If a missing setting matters, identify the narrow metadata permission or independent source that can supply it. Do not grant broad administrator rights simply to eliminate a coverage warning. The private application table was not included in the recorded collection.
Recover from common problems
- The Mac does not appear as ready: check that the correct agent is enrolled, its configuration references the intended policy, the policy belongs to this tenant, and the collector has contacted the workspace. A saved local policy does not update the fleet until the agent advertises its runtime state.
- Certificate validation fails: compare the certificate hostname, destination, CA path and chain. Fix the identity or trust material. Do not disable verification to make the job green.
- The connection times out: check the approved address and port, route, firewall and any explicit egress policy. Keep access limited to the intended database endpoint.
- The password is rejected: verify the dedicated reader account and rotate or update its local credential through the supported configuration workflow. Keep it out of logs and command-line arguments.
- The job stays queued: confirm that the selected agent is running and can reach its control plane. A single
--onceinvocation that completed before the job existed will not keep polling for it. - Coverage is partial: read the missing fields and probe statuses. Preserve useful observations and unknowns separately. Only request additional access for a specific required check.
- The wrong agent was selected: cancel work that has not completed, correct the selection and create a new scoped job. Do not copy credentials to unrelated agents to accommodate an incorrect selection.
Close the task
Confirm that the job, selected agent, connection identifier and inventory observation correspond. Preserve the evidence under your workspace's retention policy. Retire temporary credentials and agents when the task is finished. The recording removes its lab container and files and revokes its disposable agent; those cleanup steps do not imply that production agents should be deleted after every scan.
Narration transcript
Download the complete transcript. Captions are available in the player.