54 lines
4.6 KiB
Markdown
54 lines
4.6 KiB
Markdown
# As-is deployment and operational design
|
||
|
||
## Topology
|
||
|
||
```mermaid
|
||
flowchart LR
|
||
C[Client with trusted application CA] -->|HTTPS default 5443| S[systemd healthapp-b.service]
|
||
subgraph Linux application host
|
||
S --> A[/opt/healthapp-b: published .NET app]
|
||
S --> F[/etc/healthapp-b: config and TLS]
|
||
S --> K[/var/lib/healthapp-b: token keys]
|
||
end
|
||
S -->|Local restricted transport or remote VerifyFull TLS| DB[(Fresh B PostgreSQL database)]
|
||
```
|
||
|
||
Native runtime needs .NET 10 ASP.NET runtime and systemd. The application does not require Docker or Architecture A services. Test containers are verification infrastructure only. The release contains app, transient provisioner, migration scripts, installer/adapters, unit and installation guide. Build instructions and exact command options are maintained in [INSTALLATION](../deploy/INSTALLATION.md).
|
||
|
||
## Installation flow
|
||
|
||
1. Build a new release directory with deploy/build-release.sh.
|
||
2. Installer preflights root/systemd, distribution and fresh installation paths; existing installation is rejected before overwrite.
|
||
3. APT/DNF/pacman adapter supplies dependencies. Local mode initializes/starts PostgreSQL; remote mode does not install/start it.
|
||
4. Provisioner prepares private installation material, random runtime/account secrets and generated or supplied HTTPS material.
|
||
5. It creates a new database, separate NOLOGIN schema owners, restricted runtime role, module migrations and grants. Remote administration uses an owner-only connection file and VerifyFull.
|
||
6. Installer creates service identity, publishes protected config/certificate/key paths and registers/enables/starts one unit.
|
||
7. Verifier exercises trusted HTTPS, login, readiness and representative profile/measurement/history/insight/overview flows; it stops the app while DB remains ready and repeats after restart with a new PID.
|
||
|
||
Local provisioning adds a SCRAM loopback rule scoped to the new database/runtime role while retaining existing PostgreSQL rules and a protected backup. No A database is accessed. Installer verification leaves identified synthetic prototype records. The generated professional starts without assignments. There is no assignment-management endpoint.
|
||
|
||
## Configuration and security material
|
||
|
||
| Setting/material | Actual purpose/default |
|
||
|---|---|
|
||
| HEALTHAPP_CONFIGURATION_FILE | Optional explicit JSON file loaded after standard host configuration; installed path /etc/healthapp-b/appsettings.json |
|
||
| ConnectionStrings:HealthDatabase | Generated restricted runtime credentials and DB location |
|
||
| Database:Remote | Remote mode enforces VerifyFull; nonlocal host also enforces it |
|
||
| Authentication:Accounts | Prototype account password hashes/roles |
|
||
| Authentication:KeyDirectory | Persistent protected Data Protection key ring |
|
||
| Authentication:TokenLifetimeMinutes | 30; valid range 1–1440 |
|
||
| Access:ProfessionalAssignments | Predefined many-to-many account/patient assignment map |
|
||
| Resources:MaxPoolSize | 32 |
|
||
| Resources:MaxConcurrentRequests | 32 |
|
||
| Resources:MaxConcurrentAssessments | 4 |
|
||
| Resources:RequestDeadlineSeconds | 30 |
|
||
| HTTPS PFX / trust CA | Generated leaf/private key or supplied material; clients establish CA trust separately |
|
||
|
||
Installed config and private key are root-owned/service-group readable; key directory is service-owned mode 700. Generated leaf is valid one year, CA two years; automatic renewal is absent. The service uses NoNewPrivileges, PrivateTmp, ProtectSystem=strict, ProtectHome and a state-only writable path, restarting on failure. It has no PostgreSQL Requires relationship: DB readiness is independent and guidance/login can remain available during DB-only outages.
|
||
|
||
## Support and limits
|
||
|
||
Intended systemd x86_64 distributions: Debian 12/13, Ubuntu 24.04, Fedora 43/44, compatible RHEL-family feeds and rolling Arch/Manjaro. Adapters implement family-specific handling; package availability still must pass preflight. Actual native verification is Debian 12 bookworm local PostgreSQL 15.19 and remote PostgreSQL 18.6, .NET/ASP.NET 10.0.13, inside isolated privileged systemd Linux containers sharing a Manjaro host kernel. Remote tests include incorrect-hostname rejection and absence of local PostgreSQL. This is not bare-metal, VM, all-distro or measurement-environment verification.
|
||
|
||
Partial failures retain protected state and identify the failed stage. Installation has no transactional rollback or automatic resume. Future backup/upgrade/certificate operations are administrative; no HA, backup SLA, automated renewal, live data import or production certification is implemented. Measurement/comparison setup is separate: [measurement context](../ImplementationPlan/measurement-context.md).
|