Skip to content

Fortified IDDocs

Recovery diagnostics

Use the read-only recovery-diagnostics command to compare public key identities and transaction state before resuming service.

The recovery-diagnostics command observes the configured public certificate chains and bounded transaction and audit metadata in the database for the human signing mode. It starts no listener, authenticates no signer, and migrates, resets, retries and signs nothing.

It is not a readiness check. It does not prove that a private key is available, that the schema is complete, that a restore is acceptable or that the database is current.

Run as the service account with the same protected configuration and, for SoftHSM, the same SOFTHSM2_CONF:

Terminal window
./bin/signing-server recovery-diagnostics /protected/server.json
./bin/signing-server recovery-diagnostics /protected/server.json --expected /protected/expected-public.json

On Windows use .\bin\signing-server.cmd with the same arguments.

The command reads the runtime credential only. For PKCS#11 it logs in to read public objects and then logs out, so a wrong PIN can count against the token's retry limit. For PKCS#12 it never requests a private key. Public chain checks do not establish trust and do not perform a TLS handshake.

Exit code Meaning
0 The observations are complete and consistent, show no uncertain outcome and match the reference you supplied. This grants no authority to sign or restore.
2 Invalid usage.
3 Investigation is required: no or mismatching reference, unavailable or changed input, a provider, database, version or permission failure, inconsistent or truncated metadata, or an uncertain outcome.

Without --expected the observations are still useful, but the exit code is 3 and expected_reference is NOT_SUPPLIED. The reference file must come from an operator-approved source. Restoring it together with stale data cannot show freshness.

The command prints one signing.recovery.v1 JSON object with read_only true, private_key_probe NOT_PERFORMED, runtime_readiness NOT_PROBED, schema_integrity NOT_FULLY_ASSESSED and rollback_freshness NOT_ESTABLISHED. It also contains the configuration SHA-256, the public chain observations for the document, SAML signing, SAML decryption, DSS envelope and TLS roles, a bounded database summary and an assessment. Failed operations after the signing step count as uncertain.

The output contains no transaction identifiers, signer or requester names, digests, documents, secrets, paths or free-text errors.

The runtime account needs read access only: on PostgreSQL CONNECT, USAGE on the schemas and SELECT on the transaction, audit and history tables, and on MariaDB and SQL Server SELECT on those three tables. The command never supplies missing permissions. Keep signing traffic stopped with your maintenance controls while you run it.

Consumed organization seal and time stamp operations are never resumed. In those modes recovery-diagnostics reports that recovery is unavailable, and the separate diagnostics command shows public registrations and aggregate audit counts. Reconcile interrupted operations through the business process that owns them.

CSC has no signing-resumption or reset command. recovery-diagnostics returns CSC_RECOVERY_UNAVAILABLE with exit code 3. Its separate diagnostics command checks the dedicated OAuth schema and runtime privileges only; use health and the owning business process to assess an interrupted operation.