0
Fork 0
mirror of https://github.com/oblien/openship.git synced 2026-11-18 06:55:56 +00:00
Commit graph

345 commits

Author SHA1 Message Date
Hydra de lerne
e19711e1c5
feat: add domain virtual responses with a compact editor (#1739)
* feat: add domain virtual responses with a compact editor and bounded edge matching

* fix: keep traffic working during rolling edge script updates

* refactor: centralize edge management transport
2026-11-12 21:20:24 +02:00
Hydra de lerne
367afdec91
fix: sync dashboard setup, instance imports, and migration pages (#1729)
* fix(import): restore workspace visibility and verified edge status

* fix: complete dashboard setup and migration website updates
2026-11-12 11:10:49 +02:00
Saim Shafique
ea0d015b86
Preserve mail logs and ban history safely across engine updates (#1705)
* fix(mail): persist mail logs, fail2ban database and ignoreip across engine updates

Mail engine updates recreate the container (docker rm -f + docker run),
so anything not on a bind mount is lost: /var/log (mail.log, dovecot and
fail2ban logs), fail2ban's SQLite database, and operator ignoreip
customisations in /etc/fail2ban.

- Bind-mount /var/log and /var/lib/fail2ban from the host mail state dir.
  Deliberately not /etc/fail2ban: a seed-once mount would hide later image
  changes (same trap as #392's master.cf).
- Render operator ignoreip additions (OPENSHIP_MAIL_F2B_IGNOREIP, passed
  through engine.env) into a jail.d override on every boot, as baked
  jail.local value + operator value, so image defaults are never dropped.
- Run cron under supervisord so logrotate's daily job actually fires for
  the now-persisted logs; logrotate is installed explicitly (only a
  Recommends of rsyslog) and build-gated.

Fixes #1701

* Preserve existing mail state before replacement and repair supervised log rotation

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-11 16:54:11 +02:00
Hydra de lerne
3ca648f039
fix(edge): survive SSH disconnects during upgrades (#1699)
* fix(edge): finish upgrades and rollback independently of SSH

* Check retained edge backups before stopping traffic
2026-11-11 16:25:12 +02:00
Rohan Das
6565726c01
feat(dns): add DigitalOcean DNS provider (#1707)
* feat(dns): add DigitalOcean DNS provider support

- Add DigitalOcean DNS management for custom domains and DNS-verified HTTPS
- Preserve record ownership with paired TXT markers and update provider setup guidance

* fix(dns): parse DigitalOcean record IDs from formatted JSON

- Handle compact and pretty-printed API responses, with a fallback when Python is unavailable
- Cover record cleanup and API error responses in DNS hook tests

* fix(dns): harden DigitalOcean DNS provider after review

- Decode TXT input before writing so quoted values compare in-sync
- Treat zones not delegated to DigitalOcean nameservers as pending
- Resolve zones with one paginated domain list and strip wildcard labels
- Carry credential id and provider on unauthorized lookups so the
  reconnect modal targets the rejected credential
- Clean up ownership markers when the marked record is already gone
- Report read-only token verification accurately and surface missing
  write scope on 403
- Guard token redaction and requests against an empty token
- Share DNS name helpers and the DNS-01 cleanup hook template

* fix(dns): release owned records from inactive DigitalOcean zones

- Allow DNS cleanup to resolve inactive zones while keeping writes restricted to active zones
- Fetch DigitalOcean records and ownership markers concurrently

* fix(dns): resolve provider credentials oldest first

* Require strict JSON record IDs before DNS challenge cleanup

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-11 15:23:24 +02:00
Saim Shafique
3fd39c5dc5
fix(api): stamp PAT token id on REST audit rows and audit token reads (#1708)
* fix(api): stamp PAT token id on REST audit rows and audit token reads

Two gaps in the audit log, both from the same root: a REST call made
with a personal access token left no trace of WHICH token made it, and
a successful read made with a token left no row at all — while the
same read through MCP was audited with the token id attached.

- resolveCallClientId now falls back to the credential the auth layer
  already resolved: a token principal's session id IS its canonical
  principal id (pat:<id> / oauth:<clientId>), minted from the
  hashed-token lookup, not from anything the caller supplies. The
  nonce-signed MCP claim still wins. Browser sessions never reach the
  fallback (no principalKind), so a cookie session id can never land
  in the column. Shared operations and the deployment create path use
  the same resolver, so their rows gain the token id too. No schema
  change: the column was documented for exactly this value.
- The route emitter now audits successful reads/lists by token
  principals (PAT / OAuth) — a script holding a token gets the same
  "what did it look at" treatment MCP already gives its reads.
  Browser reads stay unaudited (too noisy), failed reads are still
  not logged, and operations that already recorded the call still
  skip the emitter. One exception: reads of the audit log itself are
  not audited — every such read would append a row to the log, so its
  total could never be stable and its facets would be dominated by
  whoever reads it most.

Fixes #1703

* fix(api): clear the error-boundary gate and the tokens parity expectation

The error-boundary gate flagged the pre-auth catch in
resolveCallClientId as unobserved. It only runs when no
RequestContext exists yet, so there is no credential to derive
from: mark it with the repo's diagnostics-ignore marker.

The tokens SDK-parity audit test listed only the three MCP rows,
but token reads are now audited by design, so the two remote
token-client reads in that test add two settings:read rows.
Expect them, matching the settings/webhooks parity updates.

Fixes #1703

* fix(api): avoid duplicate MCP read audit events

* fix(api): simplify audit coverage and reject malformed nonce bytes

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-11 14:43:44 +02:00
Hydra de lerne
dcf893c125
Fix webmail message colors across light and dark themes (#1716) 2026-11-11 13:36:41 +02:00
Hydra de lerne
2aef5b840c
Improve deployment speed, verification, and cancellation emails (#1683)
* perf: reuse Docker builders and parallelize independent Compose work

* test: exercise declared dependency gates on the isolated Docker host

* fix: preserve dependency ownership and native cache maintenance

* fix: drain dependency readiness failures through the shared task barrier

* test: align server recovery expectations with source scan recovery

* fix: retain released dependency providers during publication recovery

* Keep route verification and bound parallel deployment work safely

* Send scoped cancellation confirmations through the customer email queue

* Offer help without treating one canceled subscription as account churn

* Invite cancellation feedback and offer direct support

* Preserve native Docker dependency cache across source changes

* Keep runtime dependencies ahead of changing API source

* Split independent Docker regression suites across CI jobs

* Use fresh connections for routing configuration probes

* Show published deployments while final startup verification runs

* Complete verification translations and align test types
2026-11-09 13:51:19 +02:00
Hydra de lerne
ac1e79fa24
feat: unify Plans & billing and standardize Referral (#1680)
* feat(billing): unify plan management and referral navigation

* docs(billing): describe plan management and align summary assertions

* test(billing): align named plan and accessible summary assertions
2026-11-08 22:30:29 +02:00
Hydra de lerne
ef893be5da
feat(cloud): use the BytesMap SDK for unified telemetry and remove PostHog (#1642)
* feat(cloud): unify telemetry through the BytesMap SDK and remove PostHog

* fix(telemetry): derive HTTP span failures from final responses
2026-11-08 00:55:06 +02:00
Muhammad Asad Khan
83dd189113
fix(runtime): report structured environment apply failures safely (#1616)
* fix(services): say why an environment apply did not start

A failed environment apply only said the service did not start. Name the
cause from the replacement container's state: its exit code, restart
count, out-of-memory kill, Docker error or failed health check.

Refs #1613

* fix(runtime): redact environment values from apply failure diagnostics

* test(runtime): keep diagnostics regressions separate from command apply tests

* fix(runtime): redact command-only and escaped credentials during env apply

* fix(diagnostics): bound literal redaction and preserve structured startup reasons

* refactor(runtime): share deployment stability checks with environment apply

* fix(diagnostics): share redaction without hiding credential syntax

* fix(diagnostics): keep raw task and notification errors out of reports

* refactor(diagnostics): prefer structured provider failure summaries

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 18:04:09 +02:00
Saim Shafique
b72c7922b9
fix(compose): refresh command templates on deployment and environment apply (#1619)
* fix(compose): re-resolve ${VAR} command placeholders at deploy time

* fix(compose): resolve command templates consistently across edits and env apply

* fix(compose): retain internal file defaults for command interpolation

* refactor(compose): share source ownership and command interpolation

* refactor(compose): reuse canonical equality for source ownership

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 17:12:35 +02:00
Hydra de lerne
cb7b605613
fix(mail): share strict sender ownership for active direct aliases (#1634) 2026-11-06 14:42:47 +02:00
fatih akyon
3e42fc6614
fix(routing): make static 404 responses opt-in (#1626)
* fix(edge): serve a static site's 404.html for missing paths

* fix(routing): make static SPA fallback explicit and preserve defaults

* test(routing): update static fallback checks and run HTTP coverage

* fix(i18n): complete inbound alias guidance across locales

* test(monitoring): isolate the session in stream fixtures

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 10:36:34 +02:00
Saim Shafique
3fb7bb68fe
fix(deploy): read loopback port inventory through the edge connection (#1627)
* fix(deploy): keep loopback-port deploys working without a host channel

On a raw compose install with no host channel, every deploy failed after
the image build with "Cannot read Openship edge routes: neither Docker nor
bare OpenResty inventory is available", even though the deploy log says
host-side edge/routing steps are skipped. The loopback-port preflights read
the strict edge inventory through the demoted host executor, which refuses
every call.

Fixes #1625

When the host executor is one we demoted for having no usable channel, the
preflights now get an inventory they can read — an empty one — so
allocation rests on durable claims alone, exactly like the unscanned
live-port pick. A real conflict still fails loudly at the Docker bind.
Covers both the compose deploy preflight and the single-container
preflight (plus its port-conflict alternative path). The route-apply
safety gate is untouched: refusing a loopback route on an unreadable edge
stays deliberate there.

Test: new case in compose-host-channel-notice drives a loopback-port
compose deploy with the real demoted executor and asserts the edge proxy
handed to the preflight resolves to an empty inventory; it failed with
the reported error before this change and passes after.

* fix(deploy): inventory socket edge routes before allocating ports

* test(deploy): share edge inventory fixtures across allocation paths

* test(routing): resolve inventory from the simulated edge config

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-06 09:46:58 +02:00
Hydra de lerne
f24d89b7ab
fix(security): enforce Cloud host execution boundaries (#1615)
* fix(security): refuse workload execution on the Cloud API host

* fix(security): preserve safe Cloud transport probes and narrow hardening scope

* test(dashboard): isolate network editor session lifecycle
2026-11-05 18:20:43 +02:00
Hydra de lerne
ee6f86623e
fix: verify advisory remediation and complete Appwrite setup (#1601) 2026-11-04 14:11:56 +02:00
Hydra de lerne
0e6eb168bf
fix(mail): use configured senders for Cloud customer emails (#1580) 2026-11-04 02:13:29 +02:00
Hydra de lerne
e661bf924a
feat(mail): welcome Cloud customers and send invoice notices (#1578) 2026-11-03 20:09:42 +02:00
Hydra de lerne
c908fca03a
Merge commit from fork
* fix(auth): require explicit approval for Desktop Cloud sessions

* test(auth): keep desktop consent coverage focused on browser callbacks

* fix(auth): require a live session for connection approval

* refactor(auth): share Better Auth session lifecycle across bridges

* refactor(auth): share Better Auth session lifecycle across bridges

* fix(auth): preserve issued lifetimes for bearer sessions

* fix(auth): preserve issued lifetimes for bearer sessions

* test(auth): verify browser and Desktop bridge compatibility

* fix(auth): read live sessions for connection approval

* test(auth): cover HTTP bearer and browser session handling
2026-11-03 16:23:57 +02:00
fatih akyon
2ed06a2c2f
fix(test): match SMTP test servers to required TLS (#1573)
* test: match SMTP fixtures to required TLS

The mail transport now requires TLS, so the plaintext fake server in the cloud support test failed every send. The STARTTLS check also raced the fixture's stdout.

* test: wait for SMTP deliveries before asserting

The fixture reports deliveries over stdout, so a resolved send can arrive before the line does.
2026-11-03 16:15:43 +02:00
Hydra de lerne
6a39623ce1
fix(auth): preserve OAuth prompt and sign-in behavior (#1571) 2026-11-03 15:12:36 +02:00
Hydra de lerne
a35f609dc0
fix(security): upgrade Better Auth to 1.7.15 and patch Hono (#1568)
* fix(security): patch Better Auth and Hono advisories

* fix(auth): preserve HTTP setup during OAuth migration

* fix(auth): align MCP integration with Better Auth 1.7.15

* test(cli): align namespace fixture with current policy
2026-11-03 14:23:26 +02:00
Hydra de lerne
f37ebb8bf6
Merge commit from fork 2026-11-03 13:37:34 +02:00
Hydra
9eab8d67d8 fix(compose): resolve namespaces within the service stack 2026-11-03 12:59:01 +02:00
Hydra
c13195e099 release: finalize 0.9.7 with scoped agents and chat integrations 2026-11-01 21:16:13 +02:00
Hydra
887aaf5d9e Merge current feature tree with released 0.9.6 2026-11-01 20:30:42 +02:00
Hydra
1c726e6f1a feat: add scoped AI agents, automations and chat apps 2026-11-01 20:29:07 +02:00
Saim Shafique
ab21b6b84e
fix(api): reject permission tags pointing at nonexistent resources (#1521)
* fix(api): reject permission tags pointing at nonexistent resources

parsePermissionTag validated the action and root segments but never the
leaf, so a typo like project:servcie:write passed the boot scanner that
claims to catch tags pointing at nonexistent resources. Validate the leaf
against the known resource set with a clear error naming the bad value.

* fix(permissions): derive tag validation from shared resource definitions

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-11-01 16:10:05 +02:00
Mohamed Farahat
4e8f4c627b
feat(auth): add generic OIDC login for self-hosted dashboards (#1489)
* feat(auth): add generic oidc login for self-hosted dashboards

Register a Better Auth generic-oauth provider (id oidc) when OIDC_ISSUER, OIDC_CLIENT_ID and OIDC_CLIENT_SECRET are all set, advertise it with its OIDC_DISPLAY_NAME label, and render it on login and registration. Existing users link only when the IdP sends email_verified true, the invite-only gate still applies, and zero-auth instances reject the OAuth2 routes. Refs #1469.

* fix(auth): verify oidc id tokens against the issuer jwks

Verify the ID token signature against the discovered JWKS with the configured issuer, client audience, time claims and authorized party, and fail closed instead of falling back to userinfo. Require discovery issuer equality, require https for production endpoints except loopback, and route the code exchange through the validated token endpoint. Addresses review on #1489.

* fix(auth): validate the oidc authorize endpoint and expire discovery

Refuse OIDC sign-in unless discovery validates, require and pin the authorization endpoint the redirect uses, expire cached discovery after one hour and fail closed on a failed refresh, and cover the production issuer boot check. Addresses review on #1489.

* refactor(auth): inject the oidc discovery loader into account security

Pass loadOidcDiscovery through the plugin options like getAuthMode instead of a lazy import, so the module keeps no runtime dependency on the env-loading provider code.

* fix: verify OIDC identities and bind tokens to sign-in state

* fix(auth): isolate OIDC identities and enforce self-hosted login boundaries

* test(auth): align SDK parity config mock with OIDC policy

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
2026-10-27 07:27:51 +03:00
Helastic
4a56f3290e
fix(domains): use the project's server binding before its first deployment (#1498)
resolveServerIdForProject returned null for a project with no active
deployment, and resolveSslProvider fell back to the local host-server.
A never-deployed project bound to a remote server therefore had its
domains verified and its certificates requested on the Openship host.

PR previews verify their domains before the first deploy, so on a
remote server every preview stuck at "Preview domain is not ready".

Both resolvers now use project.serverId when there is no active
deployment. The organization ownership check is unchanged, and a
deployed project still resolves from its deployment snapshot.

Closes #1497

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 03:03:01 +03:00
Hydra de lerne
9e2072761e
feat: add Cloud affiliates and reviewed shared environment edits (#1483)
* feat: add Cloud affiliates and reviewed shared environment edits

* test: verify affiliate identity through HTTP and native authorization

* test: resolve hoisted release dependencies without runtime downloads
2026-10-25 22:03:54 +03:00
Hydra de lerne
c9863267a5
feat: add runtime security advisories and annual Cloud billing (#1453)
* feat: add runtime security advisories and annual Cloud billing

* fix(updates): show runtime advisories in the global update center

* fix(updates): synchronize advisory consent across global views

* refactor(updates): reuse normal refresh and environment flow
2026-10-24 13:37:05 +03:00
Hydra de lerne
23763b5e2f
fix(edge): prepare source image before first server deployment (#1446)
* fix(edge): deliver source image before first routing installation

* fix(deploy): prepare edge inventory for private loopback ports

* fix(edge): select container routing before fresh host provisioning

* fix(compose): prepare edge inventory for first private service rollout

* fix(edge): prove unused ingress without taking over private deployments

* fix(edge): require readable host state for empty ingress proof

* test(edge): prove Docker access in the unprivileged ingress fixture
2026-10-24 06:21:02 +03:00
Hydra de lerne
f3a55b7f49
fix(security): ship patched runtimes and add 0.9.4 changelog (#1430)
* fix(security): pin patched Node and Bun runtimes across releases

* fix(build): pass bootstrap selection independently of eval arguments

* test(build): expect the patched default Bun image in detection

* docs: prepare 0.9.4 changelog since 0.9.3
2026-10-23 20:31:37 +03:00
Hydra
7793570273 Merge main and seed the self-app dashboard recovery fixture 2026-10-23 07:21:18 +03:00
Hydra
456f0d50ee Merge main into workspace deletion fix and verify current deletion guards 2026-10-23 05:03:55 +03:00
Hydra
a0a3beddb9 feat(wizard): choose monorepo apps and browse repository folders 2026-10-23 04:02:18 +03:00
Hydra
36aa266ede Merge main into routeless deployment fix and verify routing safety 2026-10-23 02:58:44 +03:00
Hydra
53ab494d9c fix(edge): preserve host lock order for route policy publication 2026-10-23 00:01:14 +03:00
Hydra
4c75eefccc fix(edge): serialize route policy publication with lifecycle changes 2026-10-22 23:51:57 +03:00
Hydra
52dc66b6b0 fix(edge): refresh route protection integration and private rollback 2026-10-22 18:54:00 +03:00
Hydra de lerne
d321c54262
Merge pull request #1415 from abdulrahmanhossam/feat/GH-1168-disable-service-swap
feat: add per-service swap disabling
2026-10-22 16:37:18 +03:00
Hydra
8e95307699 fix: preserve service swap guarantees across configuration writes 2026-10-22 15:52:58 +03:00
Hydra de lerne
f868030313
Merge pull request #1378 from oblien/fix/cloud-provider-requests-20261020
fix(cloud): reuse scoped tokens and preserve provider throttling
2026-10-22 15:42:02 +03:00
Hydra
edcaa8cd1f fix(tokens): enforce capability scope across deployment operations 2026-10-22 13:57:13 +03:00
Hydra de lerne
f2aa422899
Merge pull request #1397 from oblien/feat/manage-and-cloud-plans
feat(billing): add Manage plans for customer-owned infrastructure
2026-10-22 13:10:29 +03:00
Fatih C. Akyon
a395eecf47 fix: run API with patched Node certificate trust 2026-10-22 11:24:06 +03:00
Hydra
b4499b90d9 fix(billing): integrate current main and tenant isolation guards 2026-10-22 07:42:32 +03:00
Hydra
e9b12044d4 fix(security): preserve terminal authority and constrain backup and SSH access 2026-10-22 06:47:52 +03:00