Snapshot with the new version of CLI

Issue Description

I took a snapshot for SystemSettings Domain Certificate (because SystemSettings have refinks on Domain and Certificate) and got an error on apply this snapshot:

✗ upsert Certificate: Certificate: match property `subjectAlternativeNames` is missing from the object body

ndjson content:

{"@type":"upsert","object":"Certificate","matchOn":["subjectAlternativeNames"],"value":{"certificate-ixoakzxwaaqa":{"privateKey":{"@type":"File","filePath":"/opt/stalwart/etc/certs/tls.key"},"certificate":{"@type":"File","filePath":"/opt/stalwart/etc/certs/tls.crt"}}}}

Expected Behavior

i hope this trouble will be fixed

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

OIDC

Additional Context

stalwart-cli 1.0.9

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

Let me look into this snapshot/CLI issue with Certificate upsert.

This should be fixed in the latest commit, can you try compiling the CLI to verify the fix?
Regarding Certificate snapshots, these only work if you are used file-based or env-based certificates, otherwise Stalwart will not return the password and you won’t be able to create it again. Adding a Certificate to a plan manually with your provided keys is fine, the issue is exporting secrets from Stalwart which are hidden over the API. There is a pending enhancement to add an option to temporarily disable this security features so snapshots can be created.