Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
> upstream documentation is accurate and fully applicable — see the
> Documentation section of `instructions.md` for links.

[Maple Proxy](https://github.com/OpenSecretCloud/maple-proxy) puts an OpenAI-compatible API in front of [Maple/OpenSecret's](https://trymaple.ai/) enclave-hosted inference, so any OpenAI client can talk to it. This package runs that proxy and adds a small chat page of its own, so the service is usable without configuring a separate client.
[Maple Proxy](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy) puts an OpenAI-compatible API in front of [Maple/OpenSecret's](https://trymaple.ai/) enclave-hosted inference, so any OpenAI client can talk to it. This package runs that proxy and adds a small chat page of its own, so the service is usable without configuring a separate client.

- **Upstream repo:** <https://github.com/OpenSecretCloud/maple-proxy>
- **Upstream repo:** <https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy>
- **Wrapper repo:** <https://github.com/Start9-Community/maple-proxy-startos>

---
Expand All @@ -37,11 +37,11 @@

Two images: the upstream proxy, and a web page built here.

| Property | Value |
| ------------- | ---------------------------------------------------------- |
| Images | `ghcr.io/opensecretcloud/maple-proxy`, plus an nginx build |
| Architectures | x86_64, aarch64 |
| Command | The proxy's entrypoint; nginx in the foreground |
| Property | Value |
| ------------- | ----------------------------------------------------------- |
| Images | `ghcr.io/mapleprivacylabs/maple-proxy`, plus an nginx build |
| Architectures | x86_64, aarch64 |
| Command | The proxy's entrypoint; nginx in the foreground |

| Subcontainer | Purpose |
| ----------------- | ------------------------------------------------- |
Expand Down Expand Up @@ -97,7 +97,7 @@ Each is bound on its own MultiHost and not masked.

**The two are not separate surfaces.** nginx forwards `/v1/` to the API server, so the Web UI address answers API calls as well — exporting only the UI does not keep the API private.

**Cross-origin requests are enabled unconditionally**, so a page loaded from any origin can call the API from a browser that can reach the address.
**Cross-origin requests are enabled only when no server-side key is configured.** In that mode, browser clients must supply their own key in the `Authorization` header. Setting a server-side key disables CORS: the bundled same-origin chat page and non-browser clients still work, but browser clients on other origins cannot call the API. Upstream ignores the server-side key whenever CORS is enabled.

Consequences worth being explicit about: with a server-side key configured, **reaching the address is enough to spend against that key** — there is no second credential. Treat both addresses as secrets, or leave the key unset and let each client bring its own.

Expand Down Expand Up @@ -158,7 +158,7 @@ A restored instance comes back configured and working immediately, since nothing
1. **Inference is not local.** Prompts are forwarded to the configured backend, which by default is operated by Maple.
2. **Neither interface is authenticated by StartOS**, and with a server-side key, address knowledge is spending power.
3. **The Web UI address also serves the API**, so the two cannot be exported independently.
4. **CORS is on unconditionally** and is not configurable from the package.
4. **CORS is enabled only without a server-side key.** Browser clients on other origins require that mode and must supply their own key.
5. **The chat page is this package's own** — minimal, and not upstream's client. It keeps no history and stores nothing.
6. **The only configuration is the backend URL and the key.** Every other upstream setting is left at its default and is not exposed.

Expand All @@ -168,7 +168,7 @@ A restored instance comes back configured and working immediately, since nothing

```yaml
package_id: maple-proxy
image: ghcr.io/opensecretcloud/maple-proxy # plus a locally built nginx image for the UI
image: ghcr.io/mapleprivacylabs/maple-proxy # plus a locally built nginx image for the UI
architectures:
- x86_64
- aarch64
Expand Down
9 changes: 5 additions & 4 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ Maple Proxy ships two images: the upstream `maple-proxy` (pulled from GHCR) and

## Determining the upstream version

- **maple-proxy** — canonical home <https://github.com/OpenSecretCloud/maple-proxy>. Latest release:
- **maple-proxy** — canonical home is the `proxy/` directory of <https://github.com/MaplePrivacyLabs/Maple>. The repo's release tags version the Maple app, not the proxy; the proxy's version is `version` in `proxy/Cargo.toml`, and CI publishes it to GHCR after each app release. Take the newest version tag GHCR serves:
```
gh release view -R OpenSecretCloud/maple-proxy --json tagName -q .tagName
TOKEN=$(curl -s "https://ghcr.io/token?scope=repository:mapleprivacylabs/maple-proxy:pull" | jq -r .token)
curl -s -H "Authorization: Bearer $TOKEN" https://ghcr.io/v2/mapleprivacylabs/maple-proxy/tags/list | jq -r '.tags[]' | sort -V
```
The pin lives in `startos/manifest/index.ts` under `images['maple-proxy'].source.dockerTag` (currently `ghcr.io/opensecretcloud/maple-proxy:0.3.2`). The GHCR tag matches the GitHub release tag with the leading `v` stripped.
The pin lives in `startos/manifest/index.ts` under `images['maple-proxy'].source.dockerTag` (currently `ghcr.io/mapleprivacylabs/maple-proxy:0.4.2`). To review a jump, find the app release whose `proxy/Cargo.toml` carries the new version and diff `proxy/` between the two releases.

## Applying the bump

- **maple-proxy** — in `startos/manifest/index.ts`, set `images['maple-proxy'].source.dockerTag` to `ghcr.io/opensecretcloud/maple-proxy:<new version>` (no leading `v`).
- **maple-proxy** — in `startos/manifest/index.ts`, set `images['maple-proxy'].source.dockerTag` to `ghcr.io/mapleprivacylabs/maple-proxy:<new version>`.
4 changes: 3 additions & 1 deletion instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Documentation

- [Maple Proxy README](https://github.com/OpenSecretCloud/maple-proxy/blob/master/README.md) — the upstream project overview and configuration reference.
- [Maple Proxy README](https://github.com/MaplePrivacyLabs/Maple/blob/master/proxy/README.md) — the upstream project overview and configuration reference.

## What you get on StartOS

Expand Down Expand Up @@ -32,6 +32,8 @@ Use the **API** interface address with any OpenAI-compatible client. Point the c

If you saved an API key with the **Configure** action, anyone who can reach the API address can use that key without supplying one of their own — and because the Web UI serves the same API paths, its address works the same way. Treat both addresses as private, or leave the key empty and have each client bring its own.

Browser clients hosted on another origin require the saved API key to be empty and must send their own key in the `Authorization` header. Saving a key disables cross-origin browser access; the bundled Web UI and non-browser clients still work.

### Configure action

Run **Configure** any time to change your API key or backend URL. The service restarts to pick up the new values.
2 changes: 1 addition & 1 deletion startos/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const main = sdk.setupMain(async ({ effects }) => {
MAPLE_HOST: '0.0.0.0',
MAPLE_PORT: String(apiPort),
MAPLE_BACKEND_URL,
MAPLE_ENABLE_CORS: 'true',
MAPLE_ENABLE_CORS: MAPLE_API_KEY ? 'false' : 'true',
RUST_LOG: 'info',
}
if (MAPLE_API_KEY) {
Expand Down
4 changes: 2 additions & 2 deletions startos/manifest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ export const manifest = setupManifest({
title: 'Maple Proxy',
license: 'MIT',
packageRepo: 'https://github.com/Start9-Community/maple-proxy-startos',
upstreamRepo: 'https://github.com/OpenSecretCloud/maple-proxy',
upstreamRepo: 'https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy',
marketingUrl: 'https://trymaple.ai/',
donationUrl: null,
description: { short, long },
volumes: ['main'],
images: {
'maple-proxy': {
source: { dockerTag: 'ghcr.io/opensecretcloud/maple-proxy:0.3.2' },
source: { dockerTag: 'ghcr.io/mapleprivacylabs/maple-proxy:0.4.2' },
arch: ['x86_64', 'aarch64'],
},
'maple-ui': {
Expand Down
52 changes: 26 additions & 26 deletions startos/versions/current.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
import { VersionInfo } from '@start9labs/start-sdk'

export const current = VersionInfo.of({
version: '0.3.2:0',
version: '0.4.2:0',
releaseNotes: {
en_US: `Updated Maple Proxy to 0.3.2.
en_US: `Updated Maple Proxy to 0.4.2.

- Verifies the backend enclave against production trust roots, matching the default backend.
- Includes upstream security updates to its dependencies.
- Updates the web interface's nginx to 1.30.6 with security fixes.
- Adds the \`/v1/systemone\` endpoint.
- Browser clients can now send their own API key in the \`Authorization\` header when no server-side key is saved.
- Saving a server-side key disables cross-origin browser access. The bundled Web UI and non-browser clients still work.

[Full upstream changes](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`,
es_ES: `Actualiza Maple Proxy a 0.3.2.
[Upstream source](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`,
es_ES: `Actualiza Maple Proxy a 0.4.2.

- Verifica el enclave del backend con las raíces de confianza de producción, que corresponden al backend predeterminado.
- Incluye actualizaciones de seguridad de sus dependencias del proyecto original.
- Actualiza el nginx de la interfaz web a 1.30.6 con correcciones de seguridad.
- Añade el endpoint \`/v1/systemone\`.
- Los clientes de navegador ahora pueden enviar su propia clave de API en el encabezado \`Authorization\` cuando no hay una clave guardada en el servidor.
- Guardar una clave en el servidor desactiva el acceso del navegador desde otros orígenes. La interfaz web incluida y los clientes que no son navegadores siguen funcionando.

[Cambios completos del proyecto original](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`,
de_DE: `Aktualisiert Maple Proxy auf 0.3.2.
[Código del proyecto original](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`,
de_DE: `Aktualisiert Maple Proxy auf 0.4.2.

- Prüft die Backend-Enklave gegen die Produktions-Vertrauensanker, passend zum Standard-Backend.
- Enthält Sicherheitsaktualisierungen der Upstream-Abhängigkeiten.
- Aktualisiert das nginx der Weboberfläche auf 1.30.6 mit Sicherheitskorrekturen.
- Fügt den Endpunkt \`/v1/systemone\` hinzu.
- Browser-Clients können jetzt ihren eigenen API-Schlüssel im \`Authorization\`-Header senden, wenn kein serverseitiger Schlüssel gespeichert ist.
- Ein gespeicherter serverseitiger Schlüssel deaktiviert den ursprungsübergreifenden Browserzugriff. Die integrierte Weboberfläche und Nicht-Browser-Clients funktionieren weiterhin.

[Vollständige Upstream-Änderungen](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`,
pl_PL: `Aktualizuje Maple Proxy do wersji 0.3.2.
[Upstream-Quellcode](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`,
pl_PL: `Aktualizuje Maple Proxy do wersji 0.4.2.

- Weryfikuje enklawę backendu względem produkcyjnych kotwic zaufania, zgodnych z domyślnym backendem.
- Zawiera aktualizacje bezpieczeństwa zależności upstream.
- Aktualizuje nginx interfejsu webowego do wersji 1.30.6 z poprawkami bezpieczeństwa.
- Dodaje punkt końcowy \`/v1/systemone\`.
- Klienci przeglądarkowi mogą teraz wysyłać własny klucz API w nagłówku \`Authorization\`, gdy na serwerze nie zapisano klucza.
- Zapisanie klucza na serwerze wyłącza dostęp z przeglądarek z innych źródeł. Wbudowany interfejs WWW i klienci inni niż przeglądarki nadal działają.

[Pełne zmiany upstream](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`,
fr_FR: `Met à jour Maple Proxy vers 0.3.2.
[Kod źródłowy upstream](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`,
fr_FR: `Met à jour Maple Proxy vers 0.4.2.

- Vérifie l'enclave du backend avec les ancres de confiance de production, qui correspondent au backend par défaut.
- Inclut les mises à jour de sécurité des dépendances du projet amont.
- Met à jour le nginx de l'interface web vers 1.30.6 avec des correctifs de sécurité.
- Ajoute le point de terminaison \`/v1/systemone\`.
- Les clients navigateur peuvent désormais envoyer leur propre clé d'API dans l'en-tête \`Authorization\` lorsqu'aucune clé n'est enregistrée côté serveur.
- Enregistrer une clé côté serveur désactive l'accès des navigateurs depuis d'autres origines. L'interface web intégrée et les clients hors navigateur continuent de fonctionner.

[Modifications complètes du projet amont](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`,
[Code source du projet amont](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`,
},
migrations: {
up: async ({ effects }) => {},
Expand Down
Loading