I've been diving into @immich/cli to see if we can specify a mtls client certificate. To do so in nodejs we usually configure the https agent for making api requests.
Unfortunately the https agent seems to be hidden away in the @immich-sdk package (/open-api/ folder)
Of which uses oazapfts package to auto gen openapi requests.
Tracking down this source, it seems we may be able to specify an fetch client
https://github.com/oazapfts/oazapfts/blob/main/packages/runtime/src/runtime.ts
If so, then we can configure immich-sdk to allow the specification of a fetch client.
What do you think?
End goal:
$> immich --help
Usage: immich [options] [command]
Command line interface for Immich
Options:
-V, --version output the version number
...
--client-cert Path to Client Certificate for authenticating with servers that are secured by mutual authentication (mTLS) (default: false, env:
IMMICH_MTLS_CLIENT_CERT)