Repository navigation
Description
Deferred future architecture — current maintainer direction (30 October 2026). Joshua's immediate objective is excellent single-user, native, locally deployed scientific software adopted organically by his lab. Multi-user hosting, SSO, external gateway/Wolfi, public identity infrastructure and the B0–B7 security expansion are future options, not release gates or active dependencies. Do not implement or ask him to administer these now. Preserve existing local protections and address demonstrated vulnerabilities, but prioritise scientific validity (#64), workflow recovery (#66), selective validated statistics (#65), performance and usability. Revisit this architecture only after successful local uptake and Joshua's explicit choice. Earlier comments are historical exploration, not current implementation instructions.
Confirmed maintainer requirement — 2026-10-30
Owner clarification via Jonathan: Joshua has explicitly required MetaManifold to be a SECURE MULTI-USER SERVICE. This supersedes the former single-operator/optional-multiuser assumption in the planning text. We have not independently reviewed the maintainer's exact threat model or deployment architecture; do not guess its details. Do not treat multi-user security as an optional institutional extension or defer it until after other upstream features.
Consequences and critical path
- Security architectural gate (before any claim of secure shared deployment): identify trusted ingress and authentication mechanism (reverse-proxy OIDC/SSO vs integrated identity, decided with Joshua), a trustworthy application principal and session/service-account model, and a default-deny route resource/action authorization matrix. Enforce backend-side; browser/UI hiding is no control. Avoid trusting arbitrary forwarded-user headers and process ENV USER.
- Ownership and tenancy model: studies/projects/runs/reference libraries/job state/remote jobs/exports, cross-study sharing, administrators and collaborators. Explicit decision on which objects are public/shared vs private. Keep existing IDs/provenance wherever possible; migration/backfill for existing data cannot invent owners silently.
- Execution and storage isolation: bind submitted and resumed jobs (fix(analysis): read R's NA as missing so parametric fits run #66) to authenticated principals and immutable permission context; prevent cancellation, reattachment, SSH-stage reuse, artifact fetch or deletion crossing tenants. Inspect OS/R/Julia shared runtime, filesystem permissions, DuckDB concurrency, shared temp/staging areas, remote SSH credentials, and output/caches for cross-user leaks. Some isolation guarantees may require per-user/per-job workers, not merely route-level access checks.
- Audit and incident response: attributable append-only event records for reads of sensitive materials, writes, exports, authz refusals, deletions, remote job actions; metadata minimisation, tamper model, retention and failure behaviour; no claim that a local hash chain alone is attacker-resistant.
- Resource controls: per-user and global quotas for body size, file uploads, running jobs, R/Julia concurrency, CPU/memory/disk, SSE connections, remote execution; ensure one user cannot trivially starve another.
- Security and scientific tests: hostile cross-tenant fixture tests (IDOR, read/write/download/delete, job resume/cancel, reference changes, caches, reports, browser sessions), role-matrix tests, migration/rollback tests, secure transport/trusted-proxy tests, error redaction, logs; preserve existing provenance, integrity and analysis output. Keep Julia/R/bun pins and upstream contribution rules.
- Access-control first, external availability second: exact PR slicing after Joshua approves architecture: (1) threat/deployment/tenancy contract + protected default, (2) trusted principal and session boundary, (3) central backend resource/action authorisation and storage/job ownership, (4) migration plus cross-tenant tests, (5) audit/quotas/operational hardening. This is a large programme. The upstream Notice to Project Owner: Comprehensive Review & Roadmap Status (2026-09-25) #64 statistical repro and fix: parametric fits run again; CI names failing assertions #65 port can progress in separate branches concurrently, but do not market the service as secure multi-user until the gate is passed.
Decisions genuinely requiring Joshua
- Which identity provider/SSO and supported deployment topology?
- Private-by-default vs shared-by-default study assets; who owns reference libraries?
- User and service roles, group collaboration, administrator scope, permissions and tenancy boundaries.
- Whether Julia/R/shell pipelines can be mutually isolated in the same OS process/service account; what trust level is expected among users?
- Migration treatment for pre-existing unowned projects and remote jobs, and support/operational duties.
- Resource quotas, audit retention, backup and recovery requirements.
Highest-priority warning: the old dossier labels 'no identity' critical only for its high-assurance target. The current maintainer requirement makes it a functional product blocker for secure multi-user deployment. No previous security dossier PR implemented these controls. Sensitive exploit specifics belong in private disclosure.
Purpose
Prepare a core multi-user security programme for upstream, distinct from the larger fork-only institutional classification programme. This issue is a public tracking record only; do not disclose working exploit chains or secret data here.
Existing work
- Fork PR #295 merged a static security dossier and proposed remediation, not production security fixes.
- Source: security dossier and proposal. Its assumptions and line references were prepared against earlier fork code; revalidate against current upstream and fork separately.
- The fork contains DOI/Zenodo publication routes absent from Joshua's current upstream. Treat those as fork-only; never report them to Joshua as an upstream vulnerability.
- Existing code has valuable path containment, Origin safeguards, AST validation, data-integrity checks. Preserve these and regression-test them.
Decision blocks to discuss with Joshua (one architectural discussion before PRs)
| Block | Potential benefit | Acceptance/regression cost and risk | Initial boundary |
|---|---|---|---|
| S0: evidence + threat model | Clarifies what the local single-user tool is / is not defending | Maintainer review and careful terminology; no production change | Publicly discuss scope, privately disclose specific unpatched vulnerabilities |
| S1: HTTP hardening / bounds / egress validation | Reduces exposure to accidental network use, untrusted input and resource exhaustion | May disrupt remote use, upload-heavy datasets or existing lab configurations; benchmark real limits | Small, reversible patches + negative tests |
| S2: audit + recoverable deletion | Better provenance, incident recovery, accountability | Disk growth, privacy of logs, performance, durability/concurrency, data-retention obligations | Explicitly decide whether intended for his default deployment |
| S3: identity + scoped access | Makes shared/multi-user deployment safer | Significant change to 155-route model, host/proxy trust, UI and ops requirements; avoid spoofable proxy headers and treating ENV USER as a human principal | Optional deployment profile, owner approval first |
| S4: classification/retention/export | Useful for regulated institutional settings | Strong policy/operational overhead; accreditation belongs to the deploying institution | Fork/institution extension unless explicitly wanted |
| S5: security evidence CI | Gives falsifiable regression evidence | Runtime, false positives and dependencies; not a universal 'certified' score | Minimal tests first; optional separate scan lane |
Important corrections before implementation
- Loopback + environment flag does not by itself authenticate a reverse-proxy header: require enforced trusted proxy boundary.
- A process's
USERis not a human-user identity on a multi-user web service. - A local hash chain is tamper-evident only within its trust model; an attacker able to rewrite the entire log can recompute it. Consider storage separation/anchoring and durability tests.
- Whole-disk encryption and legal compliance cannot be attested by source changes alone.
Acceptance
- Ask maintainer which deployment contexts he wants to support and what friction budget is acceptable.
- Verify findings against pinned upstream and fork commits, with safe fixtures; coordinate privately on sensitive cases.
- Propose one logical change per PR, from current upstream
main, no merge commits, verified signatures, passing pinned Julia/R/bun CI, no unapproved package/framework/lockfile/licence changes. - Offer concise benefit/risk/reversibility table to Joshua before implementing architectural blocks.
- Bring accepted upstream commits back into the enhanced fork through focused fork PRs; record intentional differences, not perpetual failed sync.
- Keep R1/R2/... institutional assurance labels as claims awaiting independent deployment evidence, not facts about a green CI run.
Activity
coderabbitai commentedon Oct 30, 2026
🔗 Related PRs
#295 - docs(security): publish the security dossier, standards assessment, proposal and remedy ultraplan [closed]
#304 - security(B0): read-only native Linux capability preflight [open]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
[-]Coordination: bounded security-and-integrity proposal for upstream; private disclosure gate[/-][+]Coordination: required secure multi-user architecture, tenant isolation and integrity gates[/+]hyperpolymath commentedon Oct 30, 2026
Architectural candidate, NOT chosen: Wolfi-backed OCI workers and optional VM isolation (2026-10-30)
Jonathan asks whether to secure supply chain via Wolfi containers / VM/hypervisor. Recommendation: evaluate, not wholesale migrate. Wolfi is a glibc-based minimal Linux userspace for OCI images (no kernel/hypervisor). It can improve package provenance/SBOM and image minimization, but does not itself implement authn/authz/tenant isolation. Container isolation shares a host kernel; VM-backed workers may be warranted where arbitrary user-controlled scripts/commands or mutually untrusted tenants are allowed. A trusted control plane and identity-bound durable jobs are prerequisites regardless of packaging.
Decision structure: trusted single operator vs untrusted tenants is settled in favor of secure multi-user; still ask Joshua precisely whether researcher uploads are only data/configuration or can include executable plugins/scripts, and whether existing remote SSH/HPC hosts and data storage are in-scope. Keep Oxygen/React/RCall/DuckDB constraints; avoid unrelated architecture changes in upstream.
Reversible pilot: create only one isolated representative pipeline-worker image behind an optional worker-executor seam, with exact pinned Julia 1.12.5 / R/tool compatibility or documented mismatch; use no production defaults yet. Compare current output hashes, datasets, memory/time and #66 detach/reattach/cancel semantics; subject to reviewed network, volumes, runtime uid, seccomp, capabilities, rootless user namespaces, no privileged mounts, no host socket, no cross-tenant shared mutable cache, scrubbed logs. VM-backed runner if model requires it; no Kubernetes prerequisite.
Supply chain gate independent of Wolfi: pin OCI images by digest and language packages via Manifest.toml/renv.lock/bun.lock, build from pinned sources, emit SBOM and provenance, sign images/attestations with verifiable CI identity (cosign), scan image vulnerabilities, and verify signatures/allowlist before workload execution. Wolfi has a rolling latest-package policy, potential tension with Joshua's immutable Julia/R/Bioconductor pins and scientific reproducibility; test support/patching availability rather than assuming secure = reproducible. Security updates require pinned version rebuild and scientific regression tests.
Critical decision: a hypervisor does not solve cross-user access control in application API, SQL, audit or browser; Wolfi does not remove work of isolating RCall/Julia processes or SSH credentials. Product core security is still a multi-stage project; optional worker isolation may reduce blast radius and be a safer design than full-framework replatforming. No container/VM implementation or benchmark performed yet.
References: https://www.chainguard.dev/docs/open-source/wolfi ; https://kubernetes.io/docs/concepts/security/multi-tenancy/ ; https://www.chainguard.dev/docs/chainguard/containers/faq ; https://docs.sigstore.dev/cosign/verifying/verify/ .
hyperpolymath commentedon Oct 30, 2026
Deployment constraint confirmed: native Linux, no required VMs or containers (2026-10-30)
Jonathan relays Joshua's practical constraints: Joshua dislikes VMs (performance) and especially containers; typical Linux remote compute hosts cannot be modified at the hypervisor/kernel/runtime level, and the shipped application must run substantially as delivered. Jonathan personally favours containers, but that must not become an upstream deployment requirement. This supersedes the earlier suggestion that an OCI/Wolfi worker pilot should define the target architecture.
Adopt a native-first multi-user security design:
no_new_privs, cgroups/rlimits when available, Landlock on supported kernels, bubblewrap/user namespaces only if usable without privilege and the operator accepts them. These are extra defence-in-depth, not substitutes for identities and cross-tenant policy. Missing essential security capabilities must fail a deployment acceptance check rather than silently downgrade.setsid,nohup, cgroups, Landlock or user services; probe capabilities and offer safe supported modes.Critical decision to obtain from Joshua: Is the required service multi-user with trusted scientific workloads restricted to supported commands, or multi-tenant with potentially untrusted user-supplied scripts/executables? What OS/proxy identity, TLS termination, Unix accounts and SSH boundaries are actually available? If shared-host constraints prohibit the required security invariants, report an unsupported deployment profile instead of weakening the definition of secure.
This remains a design and risk note, not a completed patch, tested sandbox, or maintainer-approved architecture.
Evidence: upstream
src/server/jobs.jlcurrently declares an in-memory, single-user store and has no user principal onJob;src/pipeline/remote_exec.jlSSHes into staging dirs with random names and cleanup traps;start.shlaunches Julia natively. External references: BOINC VirtualBox, Linux Landlock, bubblewrap.hyperpolymath commentedon Oct 30, 2026
Native Linux security architecture v0.2 — host capabilities, protocols, crypto, delivery blocks (2026-10-30)
Constraints supplied by Jonathan from Joshua: secure multi-user service is mandatory; existing Oxygen.jl/React 18/RCall/DuckDB/scientific pipeline retained; Linux user-space deployment and SSH remote execution; no required VM, container, hypervisor access, kernel/reboot or root configuration. This is a proposal for maintainer review, not an accepted design or completed validation.
Authority matrix (do not conflate)
no_new_privs, RLIMITs, strict umask, private tempdirs, per-job resource quotasgetenforce=Enforcingdoes not mean the Julia process is confined in an appropriate domain. Installing SELinux policy, relabeling paths and switching modes is an admin/deployment task. Never attemptsetenforceor broadly disable SELinux from the application; test actual process labels and access denial. Offer equivalent AppArmor/other available LSM profiles where SELinux absent. No compulsory elevated privileges..well-known.well-known/security.txtif routed to it, but cannot set DNS records, configure upstream TLS or claim HSTS enforcement across proxy without hosting cooperation. Provide verification checks and deployment documentation.Three noninterchangeable deployment gates
Cryptography: fit to protocol and purpose rather than choosing unusual primitives
HttpOnly,Secure,SameSite), session rotation, CSRF protections, status-coded refusals and cache controls.mlkem768x25519-sha256orsntrup761x25519-sha512on compatible servers;ML-KEM-1024exists in newer RFC 10042 hybrid variants but do not assume the upstream server supports it. No silent fallback if future policy requires PQ transport. Never shipStrictHostKeyChecking=no.HTTP/DNS/security.txt realities
Content-Security-Policy(notablyframe-ancestors 'none', tuned for Vite build),X-Content-Type-Options: nosniff,Referrer-Policy, privacy-sensitiveCache-Control: no-store, cookie attributes, uniform API errors, safe CORS, request/body/upload bounds, rate limits and safe SSE limits; assert via tests against HTML, JSON, file downloads, error responses and redirect responses. HSTS only on correct HTTPS deployment, coordinated with proxy./.well-known/security.txt(RFC 9116) is helpful if MetaManifold controls the origin/domain and has a maintained disclosure contact; optional for shared hosts. DNS CAA/SSHFP/TLSA/DNSSEC/HSTS preload depend on domain/hosting governance and do not replace application authn/authz. Avoid unrelated.well-knownendpoints.Ordered blocks (some parallel)
getenforce, process SELinux context, LSM list, Landlock support, AppArmor, no_new_privs/rlimit, cgroup delegation, uid/gid/umask, TLS/identity boundary, SSH implementation+negotiated KEX, secure storage, ciphers and support; machine-readable evidence with careful redaction and manual operator attestations. Never assume these from distro name.Release gate: do not claim "secure multi-user" until a real cross-user threat model, authn/authz, identity-bound long-running jobs, storage isolation, ingress, negative tests, incident/accountability and executable-workload boundary all pass; enforce unsupported deployment refusal. All findings from static sources require runtime validation on actual supported Linux hosts.
Grounding: fork security dossier PR #295; current upstream
jobs.jlsays single-user in-memory and stores no principal; remote SSH staging is transient inremote_exec.jl; upstream request path Origin/host checks are useful but incomplete. Relevant authoritative sources: Red Hat SELinux docs https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/using_selinux/getting-started-with-selinux_using-selinux ; Linux Landlock https://docs.kernel.org/userspace-api/landlock.html ; OWASP headers https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html ; OpenSSH PQ https://www.openssh.org/pq.html ; SSH hybrid RFC 10042 https://www.rfc-editor.org/info/rfc10042/ ; RFC 9116 https://www.rfc-editor.org/info/rfc9116/ ; FIPS 203,204 https://csrc.nist.gov/pubs/fips/203/final https://csrc.nist.gov/pubs/fips/204/final ; SLSA https://slsa.dev/spec/v1.0/ .hyperpolymath commentedon Oct 30, 2026
Zero-trust feasibility and UX / algorithm performance impact — 2026-10-30
Decision: adopt zero-trust principles for the app's resource and workflow boundary, not an unsupported claim of complete host/device zero-trust assurance. Current native-Linux/no-admin/no-container/VM constraints remain. NIST SP 800-207, NCSC ZTA principles and OWASP's authorization/multi-tenancy guidance are relevant: https://csrc.nist.gov/pubs/sp/800/207/final ; https://www.ncsc.gov.uk/collection/zero-trust/architecture-design-principles ; https://cheatsheetseries.owasp.org/cheatsheets/Multi_Tenant_Security_Cheat_Sheet.html .
Trust boundaries
User experience contract
Scientific and performance invariants
Timing relative to B0–B7
B0 deployment/identity/workload trust model and baseline measurements first; B1 lightweight HTTP hardening plus baseline; B2 verified identities and authorisation first release gate; B3 durable SSH jobs and B4 owner-scoped storage/compute must meet cross-tenant negative tests; B5 audit/quotas and B6 native-supply-chain can proceed in parallel. B7 host-admin SELinux integration is an additional assurance profile, not a substitute for B2–B4 or a default prerequisite on incompatible hosts.
Status: architecture/measurement proposal, no implementation or benchmark claimed.
hyperpolymath commentedon Oct 30, 2026
Implementation started — B0/B1 draft PRs (2026-10-30)
scripts/security/linux-preflight.sh, test, README). Shell syntax and smoke/format test passed in a separate Linux execution environment; Julia/R scientific suite not locally available. Reports global SELinux mode separately from process confinement, and treats LSM/Landlock/cgroup observations conservatively. This is not a runtime enforcement or secure-host certification. Fork PR automated checks currently in progress; commits unsigned.X-Content-Type-Options: nosniff,Referrer-Policy: no-referrer,X-Frame-Options: SAMEORIGINplus regression tests across API 200, missing-file 404, Origin 403 and preflight 204. Preserves upload-specific CSP and existing CORS. No changes to algorithms, packages or host settings. Julia tests have NOT completed; no execution guarantee until CI. Review browser embedding before upstream transfer; draft/fork-only, unsigned commits.Do not attempt to merge either draft before its own checks and explicit owner review; GitHub API-produced commits need local signing for Joshua's upstream rules.
hyperpolymath commentedon Oct 30, 2026
Confirmed maintainer requirements — institutional SSO, authenticated jump/proxy, optional WireGuard (2026-10-30)
Jonathan reports Joshua's current intended deployment:
These are design requirements, not proof that any corresponding protection has shipped.
Separate the three channels — all must be modelled
Browser → application: institution SSO (prefer OIDC Authorization Code + PKCE at an approved proxy, with secure managed session; institution-specific SAML may be terminated at the trusted proxy if required). Application validates a correctly authenticated, nonspoofable principal/claim from a proven trust boundary, maps immutable subject + issuer to a local principal, then applies resource/action authorisation on every study, run, file, job, event, export and administrative action. Email/display name is not a stable identity key. Configure claim trust and role/group mapping; group changes/revocation have an explicit freshness contract.
Ingress proxy/jump host: no direct alternate reachability to an unauthenticated MetaManifold backend. Use loopback/Unix socket when proxy co-resident, otherwise a verified mutually authenticated secure channel to the backend; strictly pin trusted proxy peers and reject/strip arbitrary
X-Forwarded-*,X-User,X-Emailand similar client-supplied identity headers. Never acceptX-Forwarded-Usersolely because a header exists. If intermediary only transports opaque TLS, the backend must itself authenticate (TLS passthrough does not produce trustworthy headers). An institution's proxy must preserve SSE, large FASTQ uploads, PDF/report downloads and correctOrigin/HTTPS redirect handling.Scientific controller → remote compute host: use standard OpenSSH host-key verification and ProxyJump/-J or approved SSH
ProxyCommandas configured in the worker's SSH client profile.ProxyJumpauthenticates and tunnels to the compute host, not researcher SSO. Do not forward SSH agents/private keys to the jump server by default. Bind SSH credentials and remote job IDs to authorised study/job context. Test loss of connection through the jump host, cancellation, output reattachment, expiry and shared-host staging ownership (#66).WireGuard: an optional institution-controlled private network access lane, using peer keys and restricted routing. Peers/devices are not human researchers and are not a substitute for SSO or backend study authorisation. No requirement that MetaManifold can install WireGuard, create a network interface or gain kernel/network admin rights; application connects to an endpoint provided by the host/network operator. A userspace VPN alternative must be explicitly approved and measured if chosen. WireGuard can coexist with SSH ProxyJump; don't require both by default.
Supported patterns to test
A.
browser -> institution HTTPS/OIDC-authenticated proxy -> loopback MetaManifold -> owned jobs -> native SSH.B.
browser -> approved private network/WireGuard -> institution proxy/SSO -> MetaManifold.C.
MetaManifold -> OpenSSH ProxyJump -> remote Linux compute account; can coexist with A/B.Immediate acceptance checks / implementation sequencing
Need from Joshua/institution before coding SSO integration: OIDC vs SAML providers, issuer/tenant identifiers and issuer discovery URLs (never secrets), stable subject and group claims, which component terminates TLS/OIDC, whether a proxy and backend can be bound by Unix socket/loopback or mTLS, whether SSH jump is shared with web ingress, which standard host/network deployment capabilities are available. Implementation must remain generic (no OU-specific or Hypatia-specific identity code).
References: OWASP multi-tenant, OAuth2 Proxy trusted upstream headers, Keycloak proxy-headers guidance, OpenSSH ProxyJump, WireGuard.
hyperpolymath commentedon Oct 30, 2026
Open scientific participation is a core design constraint (2026-10-30)
Jonathan relays a crucial aspect of Joshua's open-source mission: MetaManifold must not make affiliation with, or privileged access rights at, an institution a precondition for participating in scientific investigation. Independent researchers, artists, educators, learners and young people should have credible routes to using supported scientific tools and knowledge. The threat model is serious, but it must not be mistaken for an institutional-membership eligibility rule.
Architectural correction: institutional SSO remains a required supported deployment option, but must not be the sole architecture or a hard dependency across all deployments. Define a provider-neutral verified principal/session and resource-action authorisation contract; support trusted institutional OIDC/SAML-at-proxy where available and an independently operated sign-in mechanism (e.g., standard OIDC provider or passkeys) for noninstitutional/community deployments, without bespoke authentication cryptography. No one gets unauthorised study access by virtue of affiliation, and lack of affiliation is not itself grounds to deny a locally authorised account. Users can retain account identity across providers only via explicit, verified account linking; never infer identity from equal email strings. Hosts may still have their own licensing, capacity, institutional policy and dataset restrictions; open-source code does not imply that every institution must fund unlimited public compute.
Separate policies explicitly:
Useful tiers of deployments, not unequal scientific correctness: public documentation and synthetic-data demos; optional hosted community service with fair compute budgets; self-hosted native deployment; institutional deployments with SSO and restricted data. Wherever the same approved workflow, toolchain and input contract is available, scientific result semantics must not depend on social status, account type or authentication method. Restricted datasets/expensive institutional clusters may have separate justified policies.
Gateway design: Wolfi gateway is optional and independently reusable, not tied to any university IdP or single commercial login provider; an accessible gateway can route researchers to approved public/community/self-host services while respecting private university networks. Proxy and WireGuard authenticate network paths, not someone's eligibility to do research.
First test/acceptance requirement for B2: include at least two login-source fixtures (institutional researcher and noninstitutional researcher) that map to equivalent local permissions for an explicitly shared project, plus negative cross-tenant and revoked-account tests. Authorization depends on resource grants, not an
institutional=truepredicate. Document migration/account linking and the experience when an IdP is unavailable.This is a foundational design requirement; not a claim that public hosting, compute funding, minor onboarding or noninstitutional login have already been implemented or approved by Joshua. Reconcile detailed hosting policy with Joshua without overfitting independent authentication into an institution-only deployment.
[-]Coordination: required secure multi-user architecture, tenant isolation and integrity gates[/-][+]Deferred future option: secure multi-user architecture, gateway and identity[/+]