Remove self-signed TLS option (system trust only); add session changelog
Parity with the Android client: drop the "Allow self-signed certificate" escape hatch. The app now performs system TLS trust only — a self-signed appliance must have its CA installed on the device (MDM/profile). A code-only public-key pinning policy remains (no UI). - ServerTrustEvaluator: remove ServerTrustPolicy.allowSelfSignedForHost and its challenge handler; keep .system (default) and .pinPublicKeySHA256. - SettingsView: remove the self-signed toggle/state/prefill; makeConfig uses the default .system policy. - MCMSConnection / APIConfiguration: update usage-sketch + doc comments. - README / GUI-NOTES / MCMS_API.md: document system-trust-only; self-signed boxes need their CA installed on the device. - Add CHANGELOG.md for this session, flagged for the Android port. Note: configs previously persisted with the self-signed policy fail to decode and reset to defaults (one-time re-entry of the server URL). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7d8f1c7b2d
commit
6bb65d2aa3
8 changed files with 142 additions and 70 deletions
|
|
@ -37,18 +37,14 @@ final class MCMSConnection {
|
|||
/*
|
||||
USAGE SKETCH (delete once real views exist)
|
||||
|
||||
// Direct access to the appliance with a self-signed cert on a controlled net:
|
||||
let url = URL(string: "https://10.2.10.29/api")!
|
||||
// The appliance must present a CA-trusted cert (real cert, or an internal CA
|
||||
// installed on the device via MDM/profile) — system trust only, no self-signed bypass:
|
||||
let url = URL(string: "https://mcms.example.com/api")!
|
||||
let config = APIConfiguration(
|
||||
baseURL: url,
|
||||
apiVersion: "v1", // confirm /api/v1 vs /v1 from openapi.json
|
||||
databaseId: nil, // or a specific DB id
|
||||
trustPolicy: .allowSelfSignedForHost("10.2.10.29")
|
||||
)
|
||||
|
||||
// Behind a reverse proxy with a real cert — change ONLY the URL + trust:
|
||||
// let config = APIConfiguration(baseURL: URL(string: "https://mcms.example.com")!,
|
||||
// trustPolicy: .system)
|
||||
databaseId: nil // or a specific DB id
|
||||
) // trustPolicy defaults to .system
|
||||
|
||||
let connection = MCMSConnection(config: config)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue