@lamalibre/create-lamaste 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/scripts/bundle-vendor.js +13 -8
- package/src/index.js +4 -0
- package/src/lib/panel-pin.js +41 -0
- package/src/lib/service-config.js +6 -0
- package/vendor/docs/00-introduction/how-it-works.md +2 -2
- package/vendor/docs/00-introduction/quickstart.md +5 -5
- package/vendor/docs/00-introduction/what-is-lamaste.md +5 -5
- package/vendor/docs/01-concepts/certificates.md +3 -3
- package/vendor/docs/01-concepts/mtls.md +2 -2
- package/vendor/docs/01-concepts/security-model.md +50 -2
- package/vendor/docs/01-concepts/tickets.md +2 -2
- package/vendor/docs/01-concepts/tunneling.md +4 -4
- package/vendor/docs/02-guides/agent-setup.md +6 -6
- package/vendor/docs/02-guides/certificate-management.md +2 -2
- package/vendor/docs/02-guides/cloud-provisioning.md +4 -4
- package/vendor/docs/02-guides/desktop-app-setup.md +12 -11
- package/vendor/docs/02-guides/installation.md +3 -3
- package/vendor/docs/02-guides/onboarding.md +2 -2
- package/vendor/docs/02-guides/standalone-plugin-with-tickets.md +2 -2
- package/vendor/docs/03-architecture/installer-flow.md +2 -2
- package/vendor/docs/03-architecture/installer.md +4 -4
- package/vendor/docs/03-architecture/management-flow.md +1 -1
- package/vendor/docs/03-architecture/overview.md +5 -5
- package/vendor/docs/03-architecture/panel-client.md +7 -7
- package/vendor/docs/03-architecture/panel-server.md +2 -2
- package/vendor/docs/03-architecture/state-management.md +2 -2
- package/vendor/docs/03-architecture/system-overview.md +1 -1
- package/vendor/docs/04-api-reference/agent-hosted-plugins.md +393 -33
- package/vendor/docs/04-api-reference/app-host.md +87 -38
- package/vendor/docs/04-api-reference/audit-and-notifications.md +10 -10
- package/vendor/docs/04-api-reference/certificates.md +22 -19
- package/vendor/docs/04-api-reference/lifecycle-hooks.md +33 -11
- package/vendor/docs/04-api-reference/onboarding.md +1 -1
- package/vendor/docs/04-api-reference/overview.md +137 -135
- package/vendor/docs/04-api-reference/registry-and-oidc.md +1 -1
- package/vendor/docs/04-api-reference/tunnels.md +14 -10
- package/vendor/docs/05-operations/backup-and-restore.md +4 -1
- package/vendor/docs/05-operations/uninstalling.md +1 -1
- package/vendor/docs/05-operations/upgrades.md +6 -6
- package/vendor/docs/06-reference/config-files.md +94 -84
- package/vendor/docs/06-reference/glossary.md +3 -3
- package/vendor/docs/06-reference/installer-flags.md +13 -13
- package/vendor/docs/06-reference/ports-and-services.md +1 -1
- package/vendor/docs/06-reference/troubleshooting.md +8 -8
- package/vendor/docs/gatekeeper-design.md +8 -8
- package/vendor/docs/identity-directory-design.md +2 -2
- package/vendor/docs/package.json +1 -1
- package/vendor/docs/todo/lib-cli-desktop-refactor.md +27 -27
- package/vendor/gatekeeper/dist/cli/index.js +0 -0
- package/vendor/gatekeeper/package.json +2 -2
- package/vendor/server/bin/lamaste-server.js +11 -1
- package/vendor/server/package.json +4 -3
- package/vendor/server/src/commands/panel-pin.js +40 -0
- package/vendor/server/src/commands/plugin-settings.js +541 -0
- package/vendor/server/src/commands/plugins.js +94 -27
- package/vendor/server/src/panel-api.js +281 -34
- package/vendor/server/src/panel-identity.js +165 -0
- package/vendor/server/src/plugin-approval.js +78 -0
- package/vendor/server/src/plugin-settings.js +699 -0
- package/vendor/server-ui/dist/assets/index-25wo_8av.css +1 -0
- package/vendor/server-ui/dist/assets/index-CESyyK8V.js +84 -0
- package/vendor/server-ui/dist/index.html +2 -2
- package/vendor/serverd/package.json +2 -2
- package/vendor/serverd/src/index.js +9 -0
- package/vendor/serverd/src/lib/agent-presence.js +106 -0
- package/vendor/serverd/src/lib/hook-pipelines.js +20 -4
- package/vendor/serverd/src/lib/migrations/state/0012_plugin_settings_and_presence.sql +62 -0
- package/vendor/serverd/src/lib/mtls.js +44 -4
- package/vendor/serverd/src/lib/plugin-hooks.js +120 -20
- package/vendor/serverd/src/lib/plugin-hosting.js +35 -14
- package/vendor/serverd/src/lib/plugin-lifecycle.js +267 -83
- package/vendor/serverd/src/lib/plugin-settings.js +1101 -0
- package/vendor/serverd/src/lib/plugins.js +73 -22
- package/vendor/serverd/src/lib/tunnel-hooks.js +11 -0
- package/vendor/serverd/src/routes/management/plugins.js +166 -19
- package/vendor/serverd/src/routes/management/tunnels.js +21 -1
- package/vendor/server-ui/dist/assets/index-Bc5NCMSv.css +0 -1
- package/vendor/server-ui/dist/assets/index-DBp3cmaU.js +0 -84
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
`@lamalibre/lamaste-gatekeeper@4.
|
|
5
|
+
`@lamalibre/lamaste-gatekeeper@4.4.0` is a standalone authorization package for Lamaste. It manages **groups** and **grants**, enforces tunnel access control via a lightweight Fastify service, and serves user-friendly "request access" pages when access is denied.
|
|
6
6
|
|
|
7
|
-
It follows the same architectural pattern as `@lamalibre/lamaste-tickets@4.
|
|
7
|
+
It follows the same architectural pattern as `@lamalibre/lamaste-tickets@4.4.0` — a solid library at the core, with a service, CLI, and desktop as consumers.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -204,7 +204,7 @@ The grant system is resource-agnostic. It doesn't know what a "tunnel" or "plugi
|
|
|
204
204
|
|
|
205
205
|
```js
|
|
206
206
|
import { createGroup, listGroups, getGroup, updateGroup, deleteGroup,
|
|
207
|
-
addMembers, removeMembers, getGroupsForUser } from '@lamalibre/lamaste-gatekeeper@4.
|
|
207
|
+
addMembers, removeMembers, getGroupsForUser } from '@lamalibre/lamaste-gatekeeper@4.4.0';
|
|
208
208
|
|
|
209
209
|
createGroup(name, { description?, createdBy? })
|
|
210
210
|
// → { name, description, members: [], createdAt, createdBy }
|
|
@@ -240,7 +240,7 @@ getGroupsForUser(username)
|
|
|
240
240
|
### Grants
|
|
241
241
|
|
|
242
242
|
```js
|
|
243
|
-
import { createGrant, listGrants, getGrant, revokeGrant } from '@lamalibre/lamaste-gatekeeper@4.
|
|
243
|
+
import { createGrant, listGrants, getGrant, revokeGrant } from '@lamalibre/lamaste-gatekeeper@4.4.0';
|
|
244
244
|
|
|
245
245
|
createGrant({ principalType, principalId, resourceType, resourceId, context? })
|
|
246
246
|
// → grant object
|
|
@@ -267,7 +267,7 @@ revokeGrant(grantId)
|
|
|
267
267
|
### Authorization
|
|
268
268
|
|
|
269
269
|
```js
|
|
270
|
-
import { checkAccess } from '@lamalibre/lamaste-gatekeeper@4.
|
|
270
|
+
import { checkAccess } from '@lamalibre/lamaste-gatekeeper@4.4.0';
|
|
271
271
|
|
|
272
272
|
checkAccess(username, resourceType, resourceId);
|
|
273
273
|
// 1. Find direct user grants: principalType='user', principalId=username
|
|
@@ -282,7 +282,7 @@ checkAccess(username, resourceType, resourceId);
|
|
|
282
282
|
### Templates
|
|
283
283
|
|
|
284
284
|
```js
|
|
285
|
-
import { getAccessRequestTemplates } from '@lamalibre/lamaste-gatekeeper@4.
|
|
285
|
+
import { getAccessRequestTemplates } from '@lamalibre/lamaste-gatekeeper@4.4.0';
|
|
286
286
|
|
|
287
287
|
getAccessRequestTemplates(username, resourceName, { adminContact?, domain? })
|
|
288
288
|
// → {
|
|
@@ -864,14 +864,14 @@ On first startup, gatekeeper checks for legacy files:
|
|
|
864
864
|
|
|
865
865
|
### Panel-Server Refactoring
|
|
866
866
|
|
|
867
|
-
- `lib/user-access.js` → delegates to gatekeeper library (import from `@lamalibre/lamaste-gatekeeper@4.
|
|
867
|
+
- `lib/user-access.js` → delegates to gatekeeper library (import from `@lamalibre/lamaste-gatekeeper@4.4.0`)
|
|
868
868
|
- `lib/access-control-sync.js` → removed (gatekeeper handles authorization at nginx layer, no more Authelia config rewriting for per-user access rules)
|
|
869
869
|
- `routes/user-access.js` → simplified, delegates grant CRUD to gatekeeper
|
|
870
870
|
- Tunnel creation/update routes → call gatekeeper for access mode changes
|
|
871
871
|
|
|
872
872
|
### Installer Updates (create-lamaste)
|
|
873
873
|
|
|
874
|
-
- Install `@lamalibre/lamaste-gatekeeper@4.
|
|
874
|
+
- Install `@lamalibre/lamaste-gatekeeper@4.4.0` package
|
|
875
875
|
- Create `/etc/lamalibre/lamaste/groups.json` (empty initial state)
|
|
876
876
|
- Create `/etc/lamalibre/lamaste/access-grants.json` (empty or migrated)
|
|
877
877
|
- Create `lamalibre-lamaste-gatekeeper.service` systemd unit
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Lamaste Identity Directory — Design Document
|
|
2
2
|
|
|
3
3
|
> **Status:** design, 2026-10-13. Nothing here is implemented yet.
|
|
4
|
-
> **Package:** `@lamalibre/lamaste-identity@4.
|
|
4
|
+
> **Package:** `@lamalibre/lamaste-identity@4.4.0` (completes the existing SDK).
|
|
5
5
|
> **Companions:** `gatekeeper-design.md` (authorization),
|
|
6
6
|
> `plugin-development/design/agent-hosted-app-plugins.md` (app plugins).
|
|
7
7
|
|
|
@@ -178,7 +178,7 @@ and compares it with the local projection (by `userId` and `version`). It
|
|
|
178
178
|
applies differences and logs how many it found — a non-zero count on a
|
|
179
179
|
healthy system is a bug in the change feed and is reported to the panel.
|
|
180
180
|
|
|
181
|
-
## SDK (`@lamalibre/lamaste-identity@4.
|
|
181
|
+
## SDK (`@lamalibre/lamaste-identity@4.4.0`)
|
|
182
182
|
|
|
183
183
|
Today's surface stays; three pieces are added.
|
|
184
184
|
|
package/vendor/docs/package.json
CHANGED
|
@@ -29,7 +29,7 @@ feria dev registry — OUT OF SCOPE, do not touch
|
|
|
29
29
|
|
|
30
30
|
### Naming Rules
|
|
31
31
|
|
|
32
|
-
- **`lamaste`** is the core lib. You `import { ... } from '@lamalibre/lamaste@4.
|
|
32
|
+
- **`lamaste`** is the core lib. You `import { ... } from '@lamalibre/lamaste@4.4.0'`. No `-lib` suffix.
|
|
33
33
|
- **`-d` suffix** for daemons — Unix convention (`httpd`, `sshd`, `mongod`). Instantly signals "long-running process".
|
|
34
34
|
- **`-ui`** for React component libraries — universal term, avoids "serverd serves the panel" tautology.
|
|
35
35
|
- **`create-*`** for all npx one-shot tools — the one npm convention everyone knows.
|
|
@@ -74,24 +74,24 @@ lamaste core library (types, constants, schemas, pl
|
|
|
74
74
|
|
|
75
75
|
| # | Package (npm name) | Type | Depends on | Purpose |
|
|
76
76
|
| --- | ----------------------------------- | ----------- | ---------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
77
|
-
| 1 | `@lamalibre/lamaste@4.
|
|
78
|
-
| | | | | Subpath: `@lamalibre/lamaste@4.
|
|
79
|
-
| | | | | Subpath: `@lamalibre/lamaste@4.
|
|
80
|
-
| 2 | `@lamalibre/lamaste-agent@4.
|
|
81
|
-
| 3 | `@lamalibre/lamaste-agentd@4.
|
|
82
|
-
| 4 | `@lamalibre/lamaste-agent-ui@4.
|
|
83
|
-
| 5 | `@lamalibre/lamaste-server@4.
|
|
84
|
-
| 6 | `@lamalibre/lamaste-serverd@4.
|
|
85
|
-
| 7 | `@lamalibre/lamaste-server-ui@4.
|
|
86
|
-
| 8 | `@lamalibre/lamaste@4.
|
|
87
|
-
| 9 | `@lamalibre/lamaste-cloud@4.
|
|
88
|
-
| 10 | `@lamalibre/lamaste-tickets@4.
|
|
89
|
-
| 11 | `@lamalibre/lamaste-identity@4.
|
|
90
|
-
| 12 | `@lamalibre/create-lamaste@4.
|
|
91
|
-
| 13 | `@lamalibre/create-lamaste-agent@4.
|
|
92
|
-
| 14 | `@lamalibre/create-lamaste-desktop@4.
|
|
93
|
-
| 15 | `@lamalibre/create-lamaste-admin@4.
|
|
94
|
-
| 16 | `@lamalibre/create-lamaste-e2e@4.
|
|
77
|
+
| 1 | `@lamalibre/lamaste@4.4.0` | core lib | nothing | Types, constants, Zod schemas, plugin host Fastify plugin, atomic file helpers, client interfaces |
|
|
78
|
+
| | | | | Subpath: `@lamalibre/lamaste@4.4.0/agent` — agent domain logic |
|
|
79
|
+
| | | | | Subpath: `@lamalibre/lamaste@4.4.0/server` — server domain logic |
|
|
80
|
+
| 2 | `@lamalibre/lamaste-agent@4.4.0` | CLI | `lamaste` | Thin agent CLI. No Fastify, no HTTP |
|
|
81
|
+
| 3 | `@lamalibre/lamaste-agentd@4.4.0` | daemon | `lamaste` | Agent REST API on :9393. No CLI argument parsing |
|
|
82
|
+
| 4 | `@lamalibre/lamaste-agent-ui@4.4.0` | UI lib | `lamaste` | Agent React components + browser SPA build. Used by desktop and agentd |
|
|
83
|
+
| 5 | `@lamalibre/lamaste-server@4.4.0` | CLI | `lamaste` | **NEW.** Thin server CLI. No Fastify, no HTTP |
|
|
84
|
+
| 6 | `@lamalibre/lamaste-serverd@4.4.0` | daemon | `lamaste` | Server REST API on :3100. No CLI argument parsing. Renamed from `serverd` |
|
|
85
|
+
| 7 | `@lamalibre/lamaste-server-ui@4.4.0` | UI lib | `lamaste` | Server/admin React components + browser SPA build. Replaces both `panel-client` and `lamaste-admin-panel` |
|
|
86
|
+
| 8 | `@lamalibre/lamaste@4.4.0-desktop` | desktop | `lamaste` | Unified Tauri app. Multi-target: full, agent-only, server-only. Credentials, tray, deep links |
|
|
87
|
+
| 9 | `@lamalibre/lamaste-cloud@4.4.0` | lib + CLI | — | Cloud provider abstraction (already correct pattern) |
|
|
88
|
+
| 10 | `@lamalibre/lamaste-tickets@4.4.0` | SDK | — | Agent-to-agent authorization |
|
|
89
|
+
| 11 | `@lamalibre/lamaste-identity@4.4.0` | SDK | — | Authelia identity parsing and query |
|
|
90
|
+
| 12 | `@lamalibre/create-lamaste@4.4.0` | provisioner | `lamaste` | Server provisioner: OS hardening, nginx, Authelia, certs. `npx create-lamaste` |
|
|
91
|
+
| 13 | `@lamalibre/create-lamaste-agent@4.4.0` | provisioner | `lamaste` | Agent provisioner: cert enrollment, service setup. `npx create-lamaste-agent`. Renamed from `install-lamaste-agent` |
|
|
92
|
+
| 14 | `@lamalibre/create-lamaste-desktop@4.4.0` | installer | — | Desktop app installer. `npx create-lamaste-desktop`. Renamed from `install-lamaste-desktop` |
|
|
93
|
+
| 15 | `@lamalibre/create-lamaste-admin@4.4.0` | provisioner | `lamaste` | Admin cert upgrade to hardware-bound. `npx create-lamaste-admin`. Renamed from `install-lamaste-admin` |
|
|
94
|
+
| 16 | `@lamalibre/create-lamaste-e2e@4.4.0` | test infra | — | E2E test MCP server. `npx create-lamaste-e2e`. Renamed from `install-lamaste-e2e-mcp` |
|
|
95
95
|
| 17 | `@lamalibre/feria` | dev tool | — | Dev registry + release runner. **Out of scope — do not touch in this refactor** |
|
|
96
96
|
|
|
97
97
|
### Rename Map (1.x → 2.0.0)
|
|
@@ -116,7 +116,7 @@ The core library uses **subpath exports** to provide domain-specific entry point
|
|
|
116
116
|
|
|
117
117
|
```json
|
|
118
118
|
{
|
|
119
|
-
"name": "@lamalibre/lamaste@4.
|
|
119
|
+
"name": "@lamalibre/lamaste@4.4.0",
|
|
120
120
|
"exports": {
|
|
121
121
|
".": "./dist/index.js",
|
|
122
122
|
"./agent": "./dist/agent/index.js",
|
|
@@ -126,9 +126,9 @@ The core library uses **subpath exports** to provide domain-specific entry point
|
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
```typescript
|
|
129
|
-
import { RESERVED_API_PREFIXES, pluginManifestSchema } from '@lamalibre/lamaste@4.
|
|
130
|
-
import { loadRegistry, loadAgent, isAgentLoaded } from '@lamalibre/lamaste@4.
|
|
131
|
-
import { createTunnel, rotateCert } from '@lamalibre/lamaste@4.
|
|
129
|
+
import { RESERVED_API_PREFIXES, pluginManifestSchema } from '@lamalibre/lamaste@4.4.0';
|
|
130
|
+
import { loadRegistry, loadAgent, isAgentLoaded } from '@lamalibre/lamaste@4.4.0/agent';
|
|
131
|
+
import { createTunnel, rotateCert } from '@lamalibre/lamaste@4.4.0/server';
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
**Why subpath exports instead of three packages (`lamaste-lib`, `lamaste-lib-agent`, `lamaste-lib-server`):**
|
|
@@ -149,7 +149,7 @@ import { createTunnel, rotateCert } from '@lamalibre/lamaste@4.3.0/server';
|
|
|
149
149
|
|
|
150
150
|
| Layer | Agent side | Server side |
|
|
151
151
|
| ------------------------ | ----------------------------------------------- | ---------------------------------------------- |
|
|
152
|
-
| **Domain logic** | `@lamalibre/lamaste@4.
|
|
152
|
+
| **Domain logic** | `@lamalibre/lamaste@4.4.0/agent` | `@lamalibre/lamaste@4.4.0/server` |
|
|
153
153
|
| **Operational CLI** | `lamaste-agent` | `lamaste-server` (new) |
|
|
154
154
|
| **Long-running daemon** | `lamalibre-lamaste-agentd` on :9393 (extracted) | `lamalibre-lamaste-serverd` on :3100 (renamed) |
|
|
155
155
|
| **UI components** | `lamaste-agent-ui` (renamed) | `lamaste-server-ui` (merged) |
|
|
@@ -471,7 +471,7 @@ The Rust backend has both `commands.rs` (legacy) and `agents.rs` (multi-agent).
|
|
|
471
471
|
|
|
472
472
|
Create `packages/lamaste/` (TypeScript) with subpath exports:
|
|
473
473
|
|
|
474
|
-
**Root (`@lamalibre/lamaste@4.
|
|
474
|
+
**Root (`@lamalibre/lamaste@4.4.0`):**
|
|
475
475
|
|
|
476
476
|
- Types: `AdminClient`, `AgentClient` TypeScript interfaces, plugin manifest types, capability types
|
|
477
477
|
- Constants: Reserved API prefixes, curated plugin list, capability names
|
|
@@ -479,7 +479,7 @@ Create `packages/lamaste/` (TypeScript) with subpath exports:
|
|
|
479
479
|
- Plugin Host: Fastify plugin for plugin route mounting, bundle serving, disabled handler (unified from three routers)
|
|
480
480
|
- File Helpers: Atomic write (temp → fsync → rename), promise-chain mutex
|
|
481
481
|
|
|
482
|
-
**Agent subpath (`@lamalibre/lamaste@4.
|
|
482
|
+
**Agent subpath (`@lamalibre/lamaste@4.4.0/agent`):**
|
|
483
483
|
|
|
484
484
|
- Platform: Path helpers, platform detection (from `platform.js`)
|
|
485
485
|
- Registry: Agent registry CRUD, label validation, legacy migration (from `registry.js`)
|
|
@@ -491,7 +491,7 @@ Create `packages/lamaste/` (TypeScript) with subpath exports:
|
|
|
491
491
|
- Server Registry: servers.json and storage-servers.json CRUD (new — from Rust `cloud.rs`)
|
|
492
492
|
- Mode: Server mode and admin cert file operations (new — from Rust `mode.rs`)
|
|
493
493
|
|
|
494
|
-
**Server subpath (`@lamalibre/lamaste@4.
|
|
494
|
+
**Server subpath (`@lamalibre/lamaste@4.4.0/server`):**
|
|
495
495
|
|
|
496
496
|
- Plugins: Server-side plugin lifecycle (uses shared schema from root)
|
|
497
497
|
- Tunnels: Tunnel creation workflow with rollback (from `routes/tunnels.js`)
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lamalibre/lamaste-gatekeeper",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Authorization layer for Lamaste — groups, grants, and tunnel access control",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@fastify/rate-limit": "^10.3.0",
|
|
35
|
-
"@lamalibre/lamaste": "^4.
|
|
35
|
+
"@lamalibre/lamaste": "^4.4.0",
|
|
36
36
|
"fastify": "^5.3.3",
|
|
37
37
|
"undici": "^7.8.0",
|
|
38
38
|
"zod": "^3.24.4"
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* sites Manage static sites
|
|
20
20
|
* certs Certificate status and renewal
|
|
21
21
|
* reset-admin Emergency admin authentication reset
|
|
22
|
+
* panel-pin The public-key pin of the panel's IP listener
|
|
22
23
|
* uninstall Full server teardown
|
|
23
24
|
*/
|
|
24
25
|
|
|
@@ -59,13 +60,14 @@ ${b('COMMANDS')}
|
|
|
59
60
|
${c('status')} Server health, uptime, services, certificate status
|
|
60
61
|
${c('logs')} View server log output (journalctl wrapper)
|
|
61
62
|
${c('restart')} Restart panel server and optionally gatekeeper
|
|
62
|
-
${c('plugins')} Manage plugins (list, install, enable, disable, uninstall, update, hosting, hooks,
|
|
63
|
+
${c('plugins')} Manage plugins (list, install, enable, disable, uninstall, update, hosting, hooks, settings, …)
|
|
63
64
|
${c('push-install')} Push install: on/off, default policy, open/close an agent's window
|
|
64
65
|
${c('audit')} The panel's audit log (approvals, hostings, updates, hook events)
|
|
65
66
|
${c('tunnels')} Manage tunnels (list, create, delete, toggle)
|
|
66
67
|
${c('sites')} Manage static sites (list, create, delete)
|
|
67
68
|
${c('certs')} Certificate status, renewal, and agent cert listing
|
|
68
69
|
${c('reset-admin')} Emergency admin reset (reverts to P12, clears 2FA)
|
|
70
|
+
${c('panel-pin')} The panel's TLS key pin, to compare with what agents and the desktop pinned
|
|
69
71
|
${c('chisel')} Manage chisel tunnel-server credentials (rotate-credential)
|
|
70
72
|
${c('registry-credential')} Registry (Feria) service credential used to broker agent install tokens
|
|
71
73
|
${c('uninstall')} Full server teardown (requires confirmation)
|
|
@@ -97,6 +99,9 @@ ${b('EXAMPLES')}
|
|
|
97
99
|
${d('# Install a plugin')}
|
|
98
100
|
${c('lamaste-server plugins install @lamalibre/herd-server')}
|
|
99
101
|
|
|
102
|
+
${d("# Change an agent-hosted plugin's settings; secrets come on stdin, never as arguments")}
|
|
103
|
+
${c('lamaste-server plugins configure myplugin --set retries=5 --secrets-stdin < secrets.json')}
|
|
104
|
+
|
|
100
105
|
${d("# Let the panel install an app plugin's agent half on agent vm1 for the next hour")}
|
|
101
106
|
${c('lamaste-server push-install on')}
|
|
102
107
|
${c('lamaste-server push-install open vm1 --minutes 60')}
|
|
@@ -195,6 +200,11 @@ async function main() {
|
|
|
195
200
|
await runResetAdmin({ json, passwordFile });
|
|
196
201
|
break;
|
|
197
202
|
}
|
|
203
|
+
case 'panel-pin': {
|
|
204
|
+
const { runPanelPin } = await import('../src/commands/panel-pin.js');
|
|
205
|
+
await runPanelPin({ json });
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
198
208
|
case 'registry-credential': {
|
|
199
209
|
const { runRegistryCredential } = await import('../src/commands/registry-credential.js');
|
|
200
210
|
await runRegistryCredential(args.slice(1), { json });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lamalibre/lamaste-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Server operations CLI for Lamaste",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"test": "node --test test/*.test.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@
|
|
20
|
+
"@clack/prompts": "^1.8.1",
|
|
21
|
+
"@lamalibre/lamaste": "^4.4.0",
|
|
21
22
|
"chalk": "^5.3.0",
|
|
22
23
|
"execa": "^9.0.0"
|
|
23
24
|
},
|
|
@@ -27,6 +28,6 @@
|
|
|
27
28
|
"directory": "packages/server/cli"
|
|
28
29
|
},
|
|
29
30
|
"engines": {
|
|
30
|
-
"node": ">=20.
|
|
31
|
+
"node": ">=20.12.0"
|
|
31
32
|
}
|
|
32
33
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lamaste-server panel-pin — the public-key pin of the panel's IP listener.
|
|
3
|
+
*
|
|
4
|
+
* The panel's IP address (`https://<ip>:9292`) is served with a self-signed
|
|
5
|
+
* certificate, so the clients that reach it there pin its public key the
|
|
6
|
+
* first time they connect: `lamaste-agent setup` (and `panel reset-pin`),
|
|
7
|
+
* and the desktop app, which shows the pin with the server. This prints the
|
|
8
|
+
* pin from the certificate itself, read on the relay — compare the two to
|
|
9
|
+
* know a client pinned the panel and not something in between.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import chalk from 'chalk';
|
|
13
|
+
import { emit } from '../ndjson.js';
|
|
14
|
+
import { readPanelIdentity } from '../panel-identity.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @param {{ json: boolean }} options
|
|
18
|
+
*/
|
|
19
|
+
export async function runPanelPin({ json }) {
|
|
20
|
+
const identity = await readPanelIdentity();
|
|
21
|
+
const pin = `sha256//${identity.pin}`;
|
|
22
|
+
if (json) {
|
|
23
|
+
emit({
|
|
24
|
+
pin,
|
|
25
|
+
address: identity.address,
|
|
26
|
+
port: identity.port,
|
|
27
|
+
certificate: identity.certPath,
|
|
28
|
+
});
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
console.log(
|
|
32
|
+
`${chalk.bold('Panel:')} https://${identity.address}:${identity.port} ${chalk.dim(`(${identity.certPath})`)}`,
|
|
33
|
+
);
|
|
34
|
+
console.log(`${chalk.bold('Key pin:')} ${chalk.cyan(pin)}`);
|
|
35
|
+
console.log(
|
|
36
|
+
chalk.dim(
|
|
37
|
+
'Agents and the desktop app pin this key the first time they connect; the pin they show must be this one.',
|
|
38
|
+
),
|
|
39
|
+
);
|
|
40
|
+
}
|