@lamalibre/create-lamaste 4.4.0 → 4.5.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/lamaste-priv +200 -16
- package/src/index.js +1 -0
- package/src/lib/backend-cookie.js +65 -0
- package/src/lib/ip-panel-vhost.js +208 -0
- package/src/lib/service-config.js +5 -3
- package/src/tasks/nginx.js +18 -135
- package/src/tasks/redeploy.js +39 -1
- 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/authentication.md +1 -1
- package/vendor/docs/01-concepts/authorization.md +66 -48
- 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 +70 -33
- 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 +5 -5
- package/vendor/docs/02-guides/certificate-management.md +2 -2
- package/vendor/docs/02-guides/cloud-provisioning.md +3 -3
- package/vendor/docs/02-guides/desktop-app-setup.md +10 -10
- package/vendor/docs/02-guides/installation.md +3 -3
- package/vendor/docs/02-guides/managing-users.md +113 -25
- 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 +3 -1
- package/vendor/docs/03-architecture/nginx-configuration.md +165 -18
- package/vendor/docs/03-architecture/overview.md +13 -17
- package/vendor/docs/03-architecture/panel-client.md +6 -6
- package/vendor/docs/03-architecture/panel-server.md +3 -2
- package/vendor/docs/03-architecture/state-management.md +4 -8
- package/vendor/docs/03-architecture/system-overview.md +1 -1
- package/vendor/docs/04-api-reference/agent-hosted-plugins.md +292 -23
- package/vendor/docs/04-api-reference/app-host.md +3 -3
- package/vendor/docs/04-api-reference/gatekeeper.md +60 -5
- package/vendor/docs/04-api-reference/lifecycle-hooks.md +15 -13
- package/vendor/docs/04-api-reference/onboarding.md +1 -1
- package/vendor/docs/04-api-reference/registry-and-oidc.md +6 -4
- package/vendor/docs/04-api-reference/tunnels.md +67 -29
- package/vendor/docs/04-api-reference/users.md +241 -45
- package/vendor/docs/05-operations/backup-and-restore.md +35 -26
- package/vendor/docs/05-operations/monitoring.md +39 -0
- package/vendor/docs/05-operations/uninstalling.md +2 -1
- package/vendor/docs/05-operations/upgrades.md +15 -6
- package/vendor/docs/06-reference/config-files.md +83 -189
- 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 +25 -26
- package/vendor/docs/06-reference/troubleshooting.md +8 -8
- package/vendor/docs/gatekeeper-design.md +10 -8
- package/vendor/docs/identity-directory-design.md +48 -14
- package/vendor/docs/package.json +1 -1
- package/vendor/docs/todo/lib-cli-desktop-refactor.md +27 -27
- package/vendor/gatekeeper/dist/index.d.ts +2 -1
- package/vendor/gatekeeper/dist/index.d.ts.map +1 -1
- package/vendor/gatekeeper/dist/index.js +2 -0
- package/vendor/gatekeeper/dist/index.js.map +1 -1
- package/vendor/gatekeeper/dist/lib/grants.d.ts +6 -0
- package/vendor/gatekeeper/dist/lib/grants.d.ts.map +1 -1
- package/vendor/gatekeeper/dist/lib/grants.js +6 -1
- package/vendor/gatekeeper/dist/lib/grants.js.map +1 -1
- package/vendor/gatekeeper/dist/lib/groups.d.ts +5 -0
- package/vendor/gatekeeper/dist/lib/groups.d.ts.map +1 -1
- package/vendor/gatekeeper/dist/lib/groups.js +5 -1
- package/vendor/gatekeeper/dist/lib/groups.js.map +1 -1
- package/vendor/gatekeeper/dist/lib/principals.d.ts +29 -0
- package/vendor/gatekeeper/dist/lib/principals.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/principals.js +67 -0
- package/vendor/gatekeeper/dist/lib/principals.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/tunnels.d.ts +13 -0
- package/vendor/gatekeeper/dist/lib/tunnels.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/tunnels.js +68 -0
- package/vendor/gatekeeper/dist/lib/tunnels.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/types.d.ts +19 -0
- package/vendor/gatekeeper/dist/lib/types.d.ts.map +1 -1
- package/vendor/gatekeeper/dist/server/index.d.ts.map +1 -1
- package/vendor/gatekeeper/dist/server/index.js +22 -48
- package/vendor/gatekeeper/dist/server/index.js.map +1 -1
- package/vendor/gatekeeper/dist/server/routes/authz.d.ts +15 -1
- package/vendor/gatekeeper/dist/server/routes/authz.d.ts.map +1 -1
- package/vendor/gatekeeper/dist/server/routes/authz.js +250 -103
- package/vendor/gatekeeper/dist/server/routes/authz.js.map +1 -1
- package/vendor/gatekeeper/dist/server/routes/diagnostic.d.ts.map +1 -1
- package/vendor/gatekeeper/dist/server/routes/diagnostic.js +61 -4
- package/vendor/gatekeeper/dist/server/routes/diagnostic.js.map +1 -1
- package/vendor/gatekeeper/dist/server/routes/principals.d.ts +3 -0
- package/vendor/gatekeeper/dist/server/routes/principals.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/principals.js +27 -0
- package/vendor/gatekeeper/dist/server/routes/principals.js.map +1 -0
- package/vendor/gatekeeper/package.json +2 -2
- package/vendor/server/bin/lamaste-server.js +15 -1
- package/vendor/server/package.json +2 -2
- package/vendor/server/src/commands/plugin-identity.js +335 -0
- package/vendor/server/src/commands/plugins.js +99 -11
- package/vendor/server/src/commands/registry-credential.js +2 -1
- package/vendor/server/src/commands/tunnels.js +102 -2
- package/vendor/server/src/commands/uninstall.js +3 -1
- package/vendor/server/src/commands/users.js +358 -0
- package/vendor/server/src/plugin-approval.js +107 -5
- package/vendor/server/src/plugin-identity.js +382 -0
- package/vendor/server-ui/dist/assets/index-D-fer5ef.css +1 -0
- package/vendor/server-ui/dist/assets/index-DSaDPJaw.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 +25 -1
- package/vendor/serverd/src/lib/audience.js +576 -0
- package/vendor/serverd/src/lib/authelia.js +78 -7
- package/vendor/serverd/src/lib/config.js +68 -43
- package/vendor/serverd/src/lib/directory.js +1113 -0
- package/vendor/serverd/src/lib/entitlements.js +517 -0
- package/vendor/serverd/src/lib/gatekeeper-client.js +215 -10
- package/vendor/serverd/src/lib/hook-pipelines.js +13 -0
- package/vendor/serverd/src/lib/identity-sync.js +905 -0
- package/vendor/serverd/src/lib/migrations/state/0013_identity_directory.sql +158 -0
- package/vendor/serverd/src/lib/migrations/state/0014_identity_ledger.sql +20 -0
- package/vendor/serverd/src/lib/mtls.js +6 -2
- package/vendor/serverd/src/lib/nginx.js +279 -48
- package/vendor/serverd/src/lib/plugin-hooks.js +98 -45
- package/vendor/serverd/src/lib/plugin-hosting.js +33 -5
- package/vendor/serverd/src/lib/plugin-lifecycle.js +100 -9
- package/vendor/serverd/src/lib/plugin-packages.js +30 -22
- package/vendor/serverd/src/lib/plugins.js +94 -15
- package/vendor/serverd/src/lib/registry-credential.js +46 -6
- package/vendor/serverd/src/lib/request-logging.js +19 -0
- package/vendor/serverd/src/lib/retained-data.js +50 -4
- package/vendor/serverd/src/lib/state.js +18 -0
- package/vendor/serverd/src/lib/tunnel-hooks.js +4 -1
- package/vendor/serverd/src/lib/user-access-session.js +21 -11
- package/vendor/serverd/src/lib/user-caller.js +67 -0
- package/vendor/serverd/src/lib/user-surface.js +733 -0
- package/vendor/serverd/src/lib/vhost-reconcile.js +136 -34
- package/vendor/serverd/src/middleware/user-access-session.js +9 -0
- package/vendor/serverd/src/routes/agent-forwarder.js +4 -2
- package/vendor/serverd/src/routes/invite.js +53 -12
- package/vendor/serverd/src/routes/management/gatekeeper-proxy.js +107 -16
- package/vendor/serverd/src/routes/management/identity-directory.js +79 -0
- package/vendor/serverd/src/routes/management/invitations.js +78 -68
- package/vendor/serverd/src/routes/management/plugin-identity.js +221 -0
- package/vendor/serverd/src/routes/management/registry-credential.js +1 -1
- package/vendor/serverd/src/routes/management/tunnels.js +98 -2
- package/vendor/serverd/src/routes/management/users.js +290 -208
- package/vendor/serverd/src/routes/management.js +4 -0
- package/vendor/serverd/src/routes/onboarding/provision.js +14 -1
- package/vendor/serverd/src/routes/user-access.js +17 -4
- package/vendor/serverd/src/routes/user-surface.js +69 -0
- package/vendor/server-ui/dist/assets/index-25wo_8av.css +0 -1
- package/vendor/server-ui/dist/assets/index-CESyyK8V.js +0 -84
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Installer Flags
|
|
2
2
|
|
|
3
|
-
> CLI flags, environment variables, and exit codes for `npx @lamalibre/create-lamaste@4.
|
|
3
|
+
> CLI flags, environment variables, and exit codes for `npx @lamalibre/create-lamaste@4.5.0`.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx @lamalibre/create-lamaste@4.
|
|
8
|
+
npx @lamalibre/create-lamaste@4.5.0 [flags]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
The installer runs as root on a fresh Ubuntu 24.04 server. It is completely non-interactive by default — all configuration happens later through the browser-based onboarding wizard.
|
|
@@ -26,7 +26,7 @@ The installer runs as root on a fresh Ubuntu 24.04 server. It is completely non-
|
|
|
26
26
|
Prints a description of what the installer does, lists all flags, and exits with code 0. Does not modify anything on the system.
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
npx @lamalibre/create-lamaste@4.
|
|
29
|
+
npx @lamalibre/create-lamaste@4.5.0 --help
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
### `--yes`, `-y`
|
|
@@ -34,7 +34,7 @@ npx @lamalibre/create-lamaste@4.4.0 --help
|
|
|
34
34
|
Skips the interactive confirmation prompt that appears before installation begins. Useful for automated deployments or scripts where you cannot press Enter.
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
npx @lamalibre/create-lamaste@4.
|
|
37
|
+
npx @lamalibre/create-lamaste@4.5.0 --yes
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Without this flag, the installer displays a banner listing all changes it will make and waits for the user to press Enter or Ctrl+C.
|
|
@@ -51,7 +51,7 @@ Skips all OS hardening tasks:
|
|
|
51
51
|
Everything else (Node.js, nginx, mTLS, panel deployment) still runs.
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
npx @lamalibre/create-lamaste@4.
|
|
54
|
+
npx @lamalibre/create-lamaste@4.5.0 --skip-harden
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Use this if you manage your own firewall rules, already have fail2ban configured, or are running on a platform that handles security at a different layer.
|
|
@@ -61,7 +61,7 @@ Use this if you manage your own firewall rules, already have fail2ban configured
|
|
|
61
61
|
Allows the installer to run on a machine with a private or non-routable IP address (e.g., `192.168.x.x`, `10.x.x.x`). By default, the installer requires a public IP.
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
npx @lamalibre/create-lamaste@4.
|
|
64
|
+
npx @lamalibre/create-lamaste@4.5.0 --dev
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
This is useful for:
|
|
@@ -76,7 +76,7 @@ When `--dev` is active, the installer prints the detected IP with a note: `(dev
|
|
|
76
76
|
Forces the installer to run the complete installation pipeline, ignoring skip guards that would normally detect an existing installation. This is useful when an installation is in an inconsistent state and you want to ensure all components are fully deployed.
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
npx @lamalibre/create-lamaste@4.
|
|
79
|
+
npx @lamalibre/create-lamaste@4.5.0 --force-full
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
Use this if:
|
|
@@ -90,7 +90,7 @@ Use this if:
|
|
|
90
90
|
Prints a step-by-step guide for manually removing Lamaste from the server, then exits with code 0. Does not modify anything on the system.
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
npx @lamalibre/create-lamaste@4.
|
|
93
|
+
npx @lamalibre/create-lamaste@4.5.0 --uninstall
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
The printed guide first points to the automated removal, `sudo lamaste-server uninstall`, then covers:
|
|
@@ -207,25 +207,25 @@ Components that are always redeployed on re-run:
|
|
|
207
207
|
|
|
208
208
|
```bash
|
|
209
209
|
ssh root@203.0.113.42
|
|
210
|
-
npx @lamalibre/create-lamaste@4.
|
|
210
|
+
npx @lamalibre/create-lamaste@4.5.0
|
|
211
211
|
```
|
|
212
212
|
|
|
213
213
|
**Automated install (no confirmation prompt):**
|
|
214
214
|
|
|
215
215
|
```bash
|
|
216
|
-
npx @lamalibre/create-lamaste@4.
|
|
216
|
+
npx @lamalibre/create-lamaste@4.5.0 --yes
|
|
217
217
|
```
|
|
218
218
|
|
|
219
219
|
**Install without OS hardening:**
|
|
220
220
|
|
|
221
221
|
```bash
|
|
222
|
-
npx @lamalibre/create-lamaste@4.
|
|
222
|
+
npx @lamalibre/create-lamaste@4.5.0 --yes --skip-harden
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
**Test in a local VM:**
|
|
226
226
|
|
|
227
227
|
```bash
|
|
228
|
-
npx @lamalibre/create-lamaste@4.
|
|
228
|
+
npx @lamalibre/create-lamaste@4.5.0 --dev
|
|
229
229
|
```
|
|
230
230
|
|
|
231
231
|
**Update an existing installation:**
|
|
@@ -237,7 +237,7 @@ npx @lamalibre/create-lamaste@latest --yes
|
|
|
237
237
|
**View the uninstall guide:**
|
|
238
238
|
|
|
239
239
|
```bash
|
|
240
|
-
npx @lamalibre/create-lamaste@4.
|
|
240
|
+
npx @lamalibre/create-lamaste@4.5.0 --uninstall
|
|
241
241
|
```
|
|
242
242
|
|
|
243
243
|
## Quick Reference
|
|
@@ -34,7 +34,7 @@ A tunnel's port is also a loopback port on the relay: its vhost proxies to `127.
|
|
|
34
34
|
| 9292 | IP-based panel listener |
|
|
35
35
|
| 9294 | Gatekeeper |
|
|
36
36
|
|
|
37
|
-
A tunnel on one of them would publish that internal service on a public hostname. For the panel that is an administrator takeover, not a leak: the panel trusts the client-certificate headers nginx sets. `RESERVED_TUNNEL_PORTS` in `@lamalibre/lamaste@4.
|
|
37
|
+
A tunnel on one of them would publish that internal service on a public hostname. For the panel that is an administrator takeover, not a leak: the panel trusts the client-certificate headers nginx sets. `RESERVED_TUNNEL_PORTS` in `@lamalibre/lamaste@4.5.0` is enforced by the request schema, inside the tunnel workflow, and again when the Chisel grants are rendered. Tunnel ports must also be 1024–65535.
|
|
38
38
|
|
|
39
39
|
## Systemd Units
|
|
40
40
|
|
|
@@ -104,31 +104,30 @@ Per agent label, on the agent machine (user-level, no root):
|
|
|
104
104
|
|
|
105
105
|
### Configuration
|
|
106
106
|
|
|
107
|
-
| Path
|
|
108
|
-
|
|
|
109
|
-
| `/etc/lamalibre/lamaste/panel.json`
|
|
110
|
-
| `/etc/lamalibre/lamaste/tunnels.json`
|
|
111
|
-
| `/etc/lamalibre/lamaste/sites.json`
|
|
112
|
-
| `/etc/lamalibre/lamaste/chisel-credentials.json`
|
|
113
|
-
| `/etc/lamalibre/lamaste/chisel-users`
|
|
114
|
-
| `/etc/lamalibre/lamaste/chisel-sentinel`
|
|
115
|
-
| `/etc/lamalibre/lamaste/ticket-scopes.json`
|
|
116
|
-
| `/etc/lamalibre/lamaste/tickets.json`
|
|
117
|
-
| `/etc/lamalibre/lamaste/
|
|
118
|
-
| `/etc/lamalibre/lamaste/
|
|
119
|
-
| `/etc/
|
|
120
|
-
| `/etc/
|
|
121
|
-
| `/etc/authelia
|
|
122
|
-
| `/etc/
|
|
123
|
-
| `/etc/
|
|
124
|
-
| `/etc/nginx/
|
|
125
|
-
| `/etc/
|
|
126
|
-
| `/
|
|
127
|
-
| `/usr/local/sbin/lamaste-
|
|
128
|
-
| `/usr/local/sbin/lamaste-
|
|
129
|
-
| `/
|
|
130
|
-
| `/etc/
|
|
131
|
-
| `/etc/sysctl.d/99-lamaste.conf` | Kernel parameter (swappiness) |
|
|
107
|
+
| Path | Description |
|
|
108
|
+
| --------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
109
|
+
| `/etc/lamalibre/lamaste/panel.json` | Panel server configuration |
|
|
110
|
+
| `/etc/lamalibre/lamaste/tunnels.json` | Tunnel definitions |
|
|
111
|
+
| `/etc/lamalibre/lamaste/sites.json` | Static site definitions |
|
|
112
|
+
| `/etc/lamalibre/lamaste/chisel-credentials.json` | Per-agent Chisel credentials |
|
|
113
|
+
| `/etc/lamalibre/lamaste/chisel-users` | Chisel authfile: per-agent credentials + port grants (0640, group `lamaste-chisel`) |
|
|
114
|
+
| `/etc/lamalibre/lamaste/chisel-sentinel` | Sentinel Chisel user password |
|
|
115
|
+
| `/etc/lamalibre/lamaste/ticket-scopes.json` | Ticket scope registry (scopes, instances, assignments) |
|
|
116
|
+
| `/etc/lamalibre/lamaste/tickets.json` | Ticket and session store |
|
|
117
|
+
| `/etc/lamalibre/lamaste/gatekeeper.db` | Gatekeeper (SQLite): groups, access grants, denied-access log |
|
|
118
|
+
| `/etc/lamalibre/lamaste/gatekeeper.json` | Gatekeeper settings (cache TTL, logging) |
|
|
119
|
+
| `/etc/authelia/configuration.yml` | Authelia server configuration |
|
|
120
|
+
| `/etc/authelia/users.yml` | Authelia user database |
|
|
121
|
+
| `/etc/authelia/.secrets.json` | Authelia secrets (JWT, session, encryption) |
|
|
122
|
+
| `/etc/nginx/snippets/lamalibre-lamaste-mtls.conf` | mTLS configuration snippet |
|
|
123
|
+
| `/etc/nginx/snippets/lamalibre-lamaste-authz-cache.conf` | Gatekeeper proxy_cache zone definition |
|
|
124
|
+
| `/etc/nginx/conf.d/lamalibre-lamaste-backend-cookie.conf` | http-level map: the backends' `Cookie` without Authelia's session cookie |
|
|
125
|
+
| `/etc/sudoers.d/lamaste` | Sudo rules for lamaste user (fixed command lines, no wildcards) |
|
|
126
|
+
| `/usr/local/sbin/lamaste-priv` | Root-owned helper: panel vhosts (allow-listed), Authelia TOTP, self-update |
|
|
127
|
+
| `/usr/local/sbin/lamaste-certbot` | Root-owned certbot wrapper (validated, fixed argv) |
|
|
128
|
+
| `/usr/local/sbin/lamaste-cert-info` | Root-owned read-only Let's Encrypt certificate queries |
|
|
129
|
+
| `/etc/fail2ban/jail.d/lamaste.conf` | fail2ban jail configuration |
|
|
130
|
+
| `/etc/sysctl.d/99-lamaste.conf` | Kernel parameter (swappiness) |
|
|
132
131
|
|
|
133
132
|
### PKI Certificates
|
|
134
133
|
|
|
@@ -217,7 +217,7 @@ The agent's sync timer applies tunnel changes within about 30 seconds. If that d
|
|
|
217
217
|
lamaste-agent update # apply now and (re)install the sync timer
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
-
`update` needs the agent installed globally (`npm install -g @lamalibre/lamaste-agent@4.
|
|
220
|
+
`update` needs the agent installed globally (`npm install -g @lamalibre/lamaste-agent@4.5.0`); an agent originally set up with `npx` must be installed first.
|
|
221
221
|
|
|
222
222
|
**Cause 3: The agent does not carry the tunnel.**
|
|
223
223
|
|
|
@@ -320,7 +320,7 @@ ls -la /usr/local/bin/authelia
|
|
|
320
320
|
| Missing `panel.json` | `Config file not found` | Re-run installer or create the file manually |
|
|
321
321
|
| Invalid JSON in `panel.json` | `contains invalid JSON` | Fix the JSON syntax |
|
|
322
322
|
| Port 3100 in use | `EADDRINUSE` | Find and stop the conflicting process: `sudo ss -tlnp sport = :3100` |
|
|
323
|
-
| Missing Node.js modules | `Cannot find module` | Re-run the installer (`npx @lamalibre/create-lamaste@4.
|
|
323
|
+
| Missing Node.js modules | `Cannot find module` | Re-run the installer (`npx @lamalibre/create-lamaste@4.5.0 --yes`); `/opt/lamalibre/lamaste` is root-owned and redeployed as a whole |
|
|
324
324
|
| Permission denied writing state | `EACCES` under `/etc/lamalibre/lamaste` | Re-run the installer; the redeploy re-applies the ownership of the config and PKI directories |
|
|
325
325
|
|
|
326
326
|
### chisel fails to start
|
|
@@ -329,7 +329,7 @@ ls -la /usr/local/bin/authelia
|
|
|
329
329
|
|
|
330
330
|
| Cause | Log Message | Fix |
|
|
331
331
|
| -------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
332
|
-
| Binary missing | `exec format error` or `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.
|
|
332
|
+
| Binary missing | `exec format error` or `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.5.0 --yes`) — it installs the pinned, checksum-verified release for the server's architecture; the panel cannot install binaries |
|
|
333
333
|
| Not the pinned release | (panel log) `The installed chisel is not the pinned release — run create-lamaste ...` | Re-run the installer. Until then the panel restarts Chisel on every authfile change |
|
|
334
334
|
| Authfile or key unreadable | `permission denied` on `chisel-users` or `chisel-server.key` | Both must be `0640 lamaste:lamaste-chisel` and the unit `Group=lamaste-chisel`; restart the panel, which re-applies the authfile's. If the group, the unit or the key's ownership is wrong, re-run the installer in redeploy mode |
|
|
335
335
|
| Stopped by the panel | (panel log) `Chisel stopped: ...`; unit disabled, `chisel-failed-closed` present | Reconciliation failed closed; see [Tunnel Client Cannot Connect](#tunnel-client-cannot-connect), Cause 1 |
|
|
@@ -343,7 +343,7 @@ ls -la /usr/local/bin/authelia
|
|
|
343
343
|
| --------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
344
344
|
| Invalid `configuration.yml` | `configuration: error` | Check YAML syntax with `authelia validate-configuration --config /etc/authelia/configuration.yml` |
|
|
345
345
|
| Missing `users.yml` | `cannot open file` | Create an initial users file (see [Config Files](config-files.md)) |
|
|
346
|
-
| Binary missing | `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.
|
|
346
|
+
| Binary missing | `not found` | Re-run the installer (`npx @lamalibre/create-lamaste@4.5.0 --yes`); it installs the pinned release |
|
|
347
347
|
| Wrong permissions | `permission denied` | Authelia runs as `lamaste-authelia`: `/etc/authelia` must be `lamaste:lamaste-authelia 2770`, `configuration.yml` `0640`, `users.yml` `0660`, `db.sqlite3` owned by `lamaste-authelia`. Re-run the installer to re-apply (a root-owned `/etc/authelia` from an older version is converted), or see [Config Files](config-files.md#file-permissions-table) |
|
|
348
348
|
| Database newer than binary | storage schema version error at startup | A newer Authelia ran against this database and was replaced by an older one; the installer never downgrades an installed Authelia, so reinstall that newer release by hand |
|
|
349
349
|
|
|
@@ -516,14 +516,14 @@ sudo systemctl restart authelia
|
|
|
516
516
|
|
|
517
517
|
## Onboarding Fails: "Chisel is not installed" / "Authelia is not installed"
|
|
518
518
|
|
|
519
|
-
**Symptom:** The **Starting Chisel** or **Configuring Authelia** provisioning task fails with "Chisel is not installed. Run `npx @lamalibre/create-lamaste@4.
|
|
519
|
+
**Symptom:** The **Starting Chisel** or **Configuring Authelia** provisioning task fails with "Chisel is not installed. Run `npx @lamalibre/create-lamaste@4.5.0` on the server to repair the installation." (or the same for Authelia).
|
|
520
520
|
|
|
521
521
|
**Cause:** Onboarding downloads nothing: the installer installs both binaries (pinned releases), their systemd units and the `lamaste-authelia` account. The binary at `/usr/local/bin/chisel` or `/usr/local/bin/authelia` is missing — the installer was interrupted, or the file was removed.
|
|
522
522
|
|
|
523
523
|
**Fix:** Re-run the installer on the server, then start provisioning again from the wizard:
|
|
524
524
|
|
|
525
525
|
```bash
|
|
526
|
-
npx @lamalibre/create-lamaste@4.
|
|
526
|
+
npx @lamalibre/create-lamaste@4.5.0 --yes
|
|
527
527
|
```
|
|
528
528
|
|
|
529
529
|
If provisioning then fails writing Authelia's configuration with `/etc/authelia is not writable by the panel — run create-lamaste to repair the installation`, the directory's ownership is wrong; the same command repairs it.
|
|
@@ -538,7 +538,7 @@ If provisioning then fails writing Authelia's configuration with `/etc/authelia
|
|
|
538
538
|
|
|
539
539
|
**Fix:**
|
|
540
540
|
|
|
541
|
-
1. Re-run the installer so the helper matches the panel: `npx @lamalibre/create-lamaste@4.
|
|
541
|
+
1. Re-run the installer so the helper matches the panel: `npx @lamalibre/create-lamaste@4.5.0 --yes`
|
|
542
542
|
2. If it persists on a current install, it is a bug: the vhost generators (`packages/server/daemon/src/lib/nginx.js`) and the allow-list (`packages/provisioners/server/scripts/lamaste-priv`) must change together — `npm test` checks every generated vhost against the allow-list. Do not work around it by editing files in `/etc/nginx` by hand.
|
|
543
543
|
|
|
544
544
|
`sudo: a password is required` for `lamaste-priv` means the helper or the sudoers file is missing or outdated: re-run the installer.
|
|
@@ -621,7 +621,7 @@ df -h /
|
|
|
621
621
|
|
|
622
622
|
**Cause 3: The web root is not writable by the panel (`EACCES`).**
|
|
623
623
|
|
|
624
|
-
The panel writes `/var/www/lamaste` itself: it must be `lamaste:www-data`, directories `2750`, files `0640`. An install from before this layout had it owned by `www-data`. Re-run the installer (`npx @lamalibre/create-lamaste@4.
|
|
624
|
+
The panel writes `/var/www/lamaste` itself: it must be `lamaste:www-data`, directories `2750`, files `0640`. An install from before this layout had it owned by `www-data`. Re-run the installer (`npx @lamalibre/create-lamaste@4.5.0 --yes`); the redeploy converts the tree.
|
|
625
625
|
|
|
626
626
|
---
|
|
627
627
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# Lamaste Gatekeeper — Design Document
|
|
2
2
|
|
|
3
|
+
> **Status (4.5):** implemented, with these departures from the design below. Groups, grants and the access-request log live in SQLite — `/etc/lamalibre/lamaste/gatekeeper.db` (0600, WAL, numbered migrations) — not in `groups.json`, `access-grants.json` and `access-request-log.json`, which are no longer read; every check reads the database, and only `tunnels.json` and `gatekeeper.json` are watched. The legacy `user-plugin-access.json` grants are **not** migrated (`migrateFromLegacy` exists but nothing calls it). Gatekeeper signs relay assertions with the relay signing key: for plugin tunnels (into lamaste-agentd, since 4.3) and, from 4.5, for the panel on a plugin's user surface (`/authz/user-surface/:fqdn`, the session's username alone). Plain `authenticated` and `restricted` app tunnels pass the user as unsigned `Remote-*` headers. Plugin grants with `context.roles` are agent-hosted plugins' entitlements; Gatekeeper's own API also removes a user principal everywhere (`POST /api/principals/user/remove`) and purges one user's access-log rows (`POST /api/access-log/purge`) — the username in the body, never in a URL. Current behaviour: [Authorization](01-concepts/authorization.md), [Gatekeeper API](04-api-reference/gatekeeper.md).
|
|
4
|
+
|
|
3
5
|
## Overview
|
|
4
6
|
|
|
5
|
-
`@lamalibre/lamaste-gatekeeper@4.
|
|
7
|
+
`@lamalibre/lamaste-gatekeeper@4.5.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
8
|
|
|
7
|
-
It follows the same architectural pattern as `@lamalibre/lamaste-tickets@4.
|
|
9
|
+
It follows the same architectural pattern as `@lamalibre/lamaste-tickets@4.5.0` — a solid library at the core, with a service, CLI, and desktop as consumers.
|
|
8
10
|
|
|
9
11
|
---
|
|
10
12
|
|
|
@@ -204,7 +206,7 @@ The grant system is resource-agnostic. It doesn't know what a "tunnel" or "plugi
|
|
|
204
206
|
|
|
205
207
|
```js
|
|
206
208
|
import { createGroup, listGroups, getGroup, updateGroup, deleteGroup,
|
|
207
|
-
addMembers, removeMembers, getGroupsForUser } from '@lamalibre/lamaste-gatekeeper@4.
|
|
209
|
+
addMembers, removeMembers, getGroupsForUser } from '@lamalibre/lamaste-gatekeeper@4.5.0';
|
|
208
210
|
|
|
209
211
|
createGroup(name, { description?, createdBy? })
|
|
210
212
|
// → { name, description, members: [], createdAt, createdBy }
|
|
@@ -240,7 +242,7 @@ getGroupsForUser(username)
|
|
|
240
242
|
### Grants
|
|
241
243
|
|
|
242
244
|
```js
|
|
243
|
-
import { createGrant, listGrants, getGrant, revokeGrant } from '@lamalibre/lamaste-gatekeeper@4.
|
|
245
|
+
import { createGrant, listGrants, getGrant, revokeGrant } from '@lamalibre/lamaste-gatekeeper@4.5.0';
|
|
244
246
|
|
|
245
247
|
createGrant({ principalType, principalId, resourceType, resourceId, context? })
|
|
246
248
|
// → grant object
|
|
@@ -267,7 +269,7 @@ revokeGrant(grantId)
|
|
|
267
269
|
### Authorization
|
|
268
270
|
|
|
269
271
|
```js
|
|
270
|
-
import { checkAccess } from '@lamalibre/lamaste-gatekeeper@4.
|
|
272
|
+
import { checkAccess } from '@lamalibre/lamaste-gatekeeper@4.5.0';
|
|
271
273
|
|
|
272
274
|
checkAccess(username, resourceType, resourceId);
|
|
273
275
|
// 1. Find direct user grants: principalType='user', principalId=username
|
|
@@ -282,7 +284,7 @@ checkAccess(username, resourceType, resourceId);
|
|
|
282
284
|
### Templates
|
|
283
285
|
|
|
284
286
|
```js
|
|
285
|
-
import { getAccessRequestTemplates } from '@lamalibre/lamaste-gatekeeper@4.
|
|
287
|
+
import { getAccessRequestTemplates } from '@lamalibre/lamaste-gatekeeper@4.5.0';
|
|
286
288
|
|
|
287
289
|
getAccessRequestTemplates(username, resourceName, { adminContact?, domain? })
|
|
288
290
|
// → {
|
|
@@ -864,14 +866,14 @@ On first startup, gatekeeper checks for legacy files:
|
|
|
864
866
|
|
|
865
867
|
### Panel-Server Refactoring
|
|
866
868
|
|
|
867
|
-
- `lib/user-access.js` → delegates to gatekeeper library (import from `@lamalibre/lamaste-gatekeeper@4.
|
|
869
|
+
- `lib/user-access.js` → delegates to gatekeeper library (import from `@lamalibre/lamaste-gatekeeper@4.5.0`)
|
|
868
870
|
- `lib/access-control-sync.js` → removed (gatekeeper handles authorization at nginx layer, no more Authelia config rewriting for per-user access rules)
|
|
869
871
|
- `routes/user-access.js` → simplified, delegates grant CRUD to gatekeeper
|
|
870
872
|
- Tunnel creation/update routes → call gatekeeper for access mode changes
|
|
871
873
|
|
|
872
874
|
### Installer Updates (create-lamaste)
|
|
873
875
|
|
|
874
|
-
- Install `@lamalibre/lamaste-gatekeeper@4.
|
|
876
|
+
- Install `@lamalibre/lamaste-gatekeeper@4.5.0` package
|
|
875
877
|
- Create `/etc/lamalibre/lamaste/groups.json` (empty initial state)
|
|
876
878
|
- Create `/etc/lamalibre/lamaste/access-grants.json` (empty or migrated)
|
|
877
879
|
- Create `lamalibre-lamaste-gatekeeper.service` systemd unit
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
# Lamaste Identity Directory — Design Document
|
|
2
2
|
|
|
3
|
-
> **Status:** design, 2026-10-13.
|
|
4
|
-
> **Package:** `@lamalibre/lamaste-identity@4.
|
|
3
|
+
> **Status:** design, 2026-10-13. Partly implemented in Lamaste 4.5 for agent-hosted plugins — see [Status](#status-4-5-slice-6).
|
|
4
|
+
> **Package:** `@lamalibre/lamaste-identity@4.5.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
|
|
|
8
|
+
## Status (4.5, slice 6)
|
|
9
|
+
|
|
10
|
+
Slice 6 of the agent-hosted app plugins (`plugin-development/design/agent-hosted-app-plugins.md`, _Slice 6 as planned_) implements the part of this design that agent-hosted plugins need. Reference: [Agent-Hosted Plugins — Users and identity](04-api-reference/agent-hosted-plugins.md#users-and-identity), [Users API](04-api-reference/users.md).
|
|
11
|
+
|
|
12
|
+
**Implemented**, with where it departs from the design below:
|
|
13
|
+
|
|
14
|
+
- **The directory** in the panel's `state.db` (migration `0013`): a `userId` (UUID v4) per user, `active` / `disabled` / `removed`, a store-wide `seq` stamped by triggers, a `directoryId`. `users.yml` is **not** derived: it stays Authelia's credential file (Authelia's own password reset rewrites it); every Lamaste write goes through one lock that reconciles the directory before Authelia restarts, and the panel reconciles the directory against the file at start, after onboarding and every minute — read only. A re-created username is a new user with a new `userId`.
|
|
15
|
+
- **Disable** (Authelia's `disabled`, effective at once on the user surface), **delete** (a tombstone keeps the `userId` and the last known attributes), **erase** (the tombstone, invitations, Gatekeeper's access-request log rows and Authelia's second factors scrubbed; `remove/erased` written into every plugin's audience — inactive plugins' too, the audience being each plugin's erasure ledger until no agent keeps its data — and acknowledged by the projection's cursor; an erasure is sticky in the projection). One **offboarding** function, keyed by `userId`, runs for every disable and removal, through the API or adopted from `users.yml`: desktop sessions (an epoch keyed by `userId`), registry tokens, legacy plugin-access grants, Gatekeeper's principal and Authelia's second factors (on removal), Gatekeeper's cached sessions. A re-created username inherits no grant, group, role, second factor or session: Gatekeeper's principal and Authelia's second factors are cleared at every creation over a tombstone, a deleted user's username nobody holds takes no grant, and a username Authelia holds an OpenID Connect opaque identifier for is never given again (Authelia cannot delete one).
|
|
16
|
+
- **The manifest `identity` block** (roles, `attributes` ⊆ `displayName`, `email`) for agent-hosted plugins with an agent half, inside the approval digest when present; an update that adds or removes a role or widens the attributes waits for an administrator (`identity.changed`) — auto-approve never covers it.
|
|
17
|
+
- **Entitlements** are Gatekeeper plugin grants with `context.roles`, checked against the manifest; roleless grants never count. `user-plugin-access.json` is **not** migrated: it still gates the desktop's enrolment, not requests.
|
|
18
|
+
- **The audience** per plugin, materialized and recomputed after every panel-side change, every minute and at start.
|
|
19
|
+
- **The feed is pushed, not pulled.** An agent half cannot reach the panel, so the panel sends the data itself through the internal tunnel — `POST /admin/identity/notify`, then `/admin/identity/changes` batches, their changes sealed to the request (AES-256-GCM under a key derived from the installation secret) — with replay from 0 as the snapshot and a daily reconcile whose mismatches are audited. A plugin's users reach it only once its half has applied the feed up to the head. The subscriber is `createIdentityProjection` + `createIdentityHandlers` in `@lamalibre/lamaste@4.5.0/agent`, not an `IdentitySubscriber` in this SDK.
|
|
20
|
+
- **Identity in requests, for agent-hosted plugins:** a tunnel bound as a plugin's user surface serves `/api/<route>/app/*`; Gatekeeper attests the session's username to the panel, and the panel forwards to the agent half with `{ type: "user", userId, username, roles }` in the HMAC caller assertion — not a JWT ([question 6](#open-questions)).
|
|
21
|
+
|
|
22
|
+
**Not yet:**
|
|
23
|
+
|
|
24
|
+
- **Renames.** A username cannot be changed; the user is deleted and created again under a new `userId`.
|
|
25
|
+
- **Audience endpoints for server plugins and plain agents** (`GET /api/identity/audience…`, the in-process event, `seq` in the agent sync), and the `IdentitySubscriber` / `verifyIdentity` SDK pieces.
|
|
26
|
+
- **Signed identity for plain tunnels.** An `authenticated` or `restricted` app tunnel still passes unsigned `Remote-*` headers; only plugin tunnels and plugin user surfaces carry a signed identity.
|
|
27
|
+
- **Badges** as user credentials, **connectors** (GitLab), **CSV import** and the directory import API for external systems of record, projection age reporting.
|
|
28
|
+
- **What Authelia keeps on its own** — the OpenID Connect opaque identifier of a username (no CLI deletes one) and its authentication log — is outside erasure, as are nginx's access logs, journald's older entries and earlier backups.
|
|
29
|
+
- **Restore detection.** A relay restored from a backup keeps its `directoryId`; rotating it on restore, so every agent half replays against the restored directory, is future work. Until then an erasure made after the backup must be repeated on the restored relay (the agent halves that applied it keep it: erasure is sticky there).
|
|
30
|
+
|
|
8
31
|
## Goal
|
|
9
32
|
|
|
10
33
|
Lamaste becomes the **directory** for every application in the ecosystem, the
|
|
@@ -28,15 +51,15 @@ copy to follow Lamaste.
|
|
|
28
51
|
|
|
29
52
|
## What exists today
|
|
30
53
|
|
|
31
|
-
| Piece | State
|
|
32
|
-
| -------------------------------------------------------- |
|
|
33
|
-
| User store | Authelia's `users.yml`, keyed by **username**. No stable id.
|
|
34
|
-
| `GET /api/identity/users`, `/users/:username`, `/groups` | Read `users.yml`; admin or agent with `identity:query`.
|
|
35
|
-
| `GET /api/identity/self` | Echoes `Remote-*` headers; only meaningful behind Authelia.
|
|
36
|
-
| SDK `IdentityClient` | `listUsers`, `getUser`, `listGroups` over mTLS.
|
|
37
|
-
| SDK `parseIdentity` + Fastify plugin | Parses `Remote-User/Name/Email/Groups` headers.
|
|
38
|
-
| Tunnel vhosts |
|
|
39
|
-
| Entitlements | Two models: per-plugin grants (`user-plugin-access.json`, by username) and Gatekeeper grants (groups → resources).
|
|
54
|
+
| Piece | State |
|
|
55
|
+
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
56
|
+
| User store | Authelia's `users.yml`, keyed by **username**. No stable id. |
|
|
57
|
+
| `GET /api/identity/users`, `/users/:username`, `/groups` | Read `users.yml`; admin or agent with `identity:query`. |
|
|
58
|
+
| `GET /api/identity/self` | Echoes `Remote-*` headers; only meaningful behind Authelia. |
|
|
59
|
+
| SDK `IdentityClient` | `listUsers`, `getUser`, `listGroups` over mTLS. |
|
|
60
|
+
| SDK `parseIdentity` + Fastify plugin | Parses `Remote-User/Name/Email/Groups` headers. |
|
|
61
|
+
| Tunnel vhosts | Set `Remote-*` from Gatekeeper's answer (replacing the client's) — **unsigned**; plugin tunnels add a relay assertion. |
|
|
62
|
+
| Entitlements | Two models: per-plugin grants (`user-plugin-access.json`, by username) and Gatekeeper grants (groups → resources). |
|
|
40
63
|
|
|
41
64
|
So the SDK can list users, but nothing gives an application a stable key, a
|
|
42
65
|
scoped user list, a change feed, or a trustworthy identity on a request.
|
|
@@ -178,7 +201,7 @@ and compares it with the local projection (by `userId` and `version`). It
|
|
|
178
201
|
applies differences and logs how many it found — a non-zero count on a
|
|
179
202
|
healthy system is a bug in the change feed and is reported to the panel.
|
|
180
203
|
|
|
181
|
-
## SDK (`@lamalibre/lamaste-identity@4.
|
|
204
|
+
## SDK (`@lamalibre/lamaste-identity@4.5.0`)
|
|
182
205
|
|
|
183
206
|
Today's surface stays; three pieces are added.
|
|
184
207
|
|
|
@@ -434,11 +457,22 @@ directory and one out of it.
|
|
|
434
457
|
2. **PDKS's source of truth:** samplepark pushes into Lamaste, or Lamaste
|
|
435
458
|
mirrors samplepark?
|
|
436
459
|
3. **Erasure:** which plugins hold data that must be anonymised on request,
|
|
437
|
-
and is a single `erased` event enough for them?
|
|
460
|
+
and is a single `erased` event enough for them? _(Decided 2026-10-22 for
|
|
461
|
+
agent-hosted plugins: deleting keeps a tombstone, erasing is a separate
|
|
462
|
+
action; one `remove/erased` change, the half scrubs its row and runs the
|
|
463
|
+
plugin's anonymiser in the same transaction, and its cursor passing the
|
|
464
|
+
change is the acknowledgement.)_
|
|
438
465
|
4. **Door hardware:** which doors, and are their readers able to use
|
|
439
466
|
cryptographic cards (DESFire)? Until then, doors stay out of scope.
|
|
440
467
|
5. **GitLab password sign-in:** turn it off once OIDC sign-in works (keeps
|
|
441
468
|
offboarding single-action), with the root account as the only exception?
|
|
442
469
|
6. **Signing:** Gatekeeper signs assertions (it is already on the request
|
|
443
470
|
path), or the panel issues them and Gatekeeper only forwards — which keeps
|
|
444
|
-
Gatekeeper free of keys, as its design intends?
|
|
471
|
+
Gatekeeper free of keys, as its design intends? _(Decided 2026-10-22:
|
|
472
|
+
both, each for what it knows. **Gatekeeper attests the session** — an
|
|
473
|
+
Ed25519 relay assertion for the panel, with the relay signing key it has
|
|
474
|
+
held since 4.3, naming the Authelia username alone and bound to the
|
|
475
|
+
method and the raw request path. **The panel issues the identity
|
|
476
|
+
applications see** — the directory's `userId`, the username and the
|
|
477
|
+
plugin's roles, in the caller assertion it signs for the agent half.
|
|
478
|
+
Gatekeeper never signs a role or an attribute.)_
|
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.5.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.5.0` | core lib | nothing | Types, constants, Zod schemas, plugin host Fastify plugin, atomic file helpers, client interfaces |
|
|
78
|
+
| | | | | Subpath: `@lamalibre/lamaste@4.5.0/agent` — agent domain logic |
|
|
79
|
+
| | | | | Subpath: `@lamalibre/lamaste@4.5.0/server` — server domain logic |
|
|
80
|
+
| 2 | `@lamalibre/lamaste-agent@4.5.0` | CLI | `lamaste` | Thin agent CLI. No Fastify, no HTTP |
|
|
81
|
+
| 3 | `@lamalibre/lamaste-agentd@4.5.0` | daemon | `lamaste` | Agent REST API on :9393. No CLI argument parsing |
|
|
82
|
+
| 4 | `@lamalibre/lamaste-agent-ui@4.5.0` | UI lib | `lamaste` | Agent React components + browser SPA build. Used by desktop and agentd |
|
|
83
|
+
| 5 | `@lamalibre/lamaste-server@4.5.0` | CLI | `lamaste` | **NEW.** Thin server CLI. No Fastify, no HTTP |
|
|
84
|
+
| 6 | `@lamalibre/lamaste-serverd@4.5.0` | daemon | `lamaste` | Server REST API on :3100. No CLI argument parsing. Renamed from `serverd` |
|
|
85
|
+
| 7 | `@lamalibre/lamaste-server-ui@4.5.0` | UI lib | `lamaste` | Server/admin React components + browser SPA build. Replaces both `panel-client` and `lamaste-admin-panel` |
|
|
86
|
+
| 8 | `@lamalibre/lamaste@4.5.0-desktop` | desktop | `lamaste` | Unified Tauri app. Multi-target: full, agent-only, server-only. Credentials, tray, deep links |
|
|
87
|
+
| 9 | `@lamalibre/lamaste-cloud@4.5.0` | lib + CLI | — | Cloud provider abstraction (already correct pattern) |
|
|
88
|
+
| 10 | `@lamalibre/lamaste-tickets@4.5.0` | SDK | — | Agent-to-agent authorization |
|
|
89
|
+
| 11 | `@lamalibre/lamaste-identity@4.5.0` | SDK | — | Authelia identity parsing and query |
|
|
90
|
+
| 12 | `@lamalibre/create-lamaste@4.5.0` | provisioner | `lamaste` | Server provisioner: OS hardening, nginx, Authelia, certs. `npx create-lamaste` |
|
|
91
|
+
| 13 | `@lamalibre/create-lamaste-agent@4.5.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.5.0` | installer | — | Desktop app installer. `npx create-lamaste-desktop`. Renamed from `install-lamaste-desktop` |
|
|
93
|
+
| 15 | `@lamalibre/create-lamaste-admin@4.5.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.5.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.5.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.5.0';
|
|
130
|
+
import { loadRegistry, loadAgent, isAgentLoaded } from '@lamalibre/lamaste@4.5.0/agent';
|
|
131
|
+
import { createTunnel, rotateCert } from '@lamalibre/lamaste@4.5.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.4.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.5.0/agent` | `@lamalibre/lamaste@4.5.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.5.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.5.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.5.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`)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export type { Group, GroupState, CreateGroupOptions, UpdateGroupOptions, DeleteGroupResult, Grant, GrantState, CreateGrantOptions, GrantFilter, AccessAllowed, AccessDenied, AccessResult, AccessRequestTemplates, TemplateOptions, GatekeeperSettings, AccessRequestEntry, TunnelInfo, AutheliaSession, GatekeeperLogger, } from './lib/types.js';
|
|
1
|
+
export type { Group, GroupState, CreateGroupOptions, UpdateGroupOptions, DeleteGroupResult, Grant, GrantState, CreateGrantOptions, GrantFilter, AccessAllowed, AccessDenied, AccessResult, AccessRequestTemplates, TemplateOptions, GatekeeperSettings, AccessRequestEntry, TunnelInfo, TunnelUserSurfaceInfo, PluginTunnelTarget, AutheliaSession, GatekeeperLogger, } from './lib/types.js';
|
|
2
2
|
export { PRINCIPAL_TYPES, RESOURCE_TYPES, ACCESS_MODES, RESERVED_GROUP_NAMES, MAX_GROUPS, MAX_GRANTS, GRANT_RETENTION_MS, SESSION_CACHE_TTL_MS, GROUP_NAME_REGEX, MAX_GROUP_NAME_LENGTH, MIN_GROUP_NAME_LENGTH, DEFAULT_DATA_DIR, GROUPS_FILE, GRANTS_FILE, SETTINGS_FILE, ACCESS_LOG_FILE, AUTHELIA_VERIFY_URL, GATEKEEPER_PORT, } from './lib/constants.js';
|
|
3
3
|
export type { PrincipalType, ResourceType, AccessMode } from './lib/constants.js';
|
|
4
4
|
export { createGroup, listGroups, getGroup, updateGroup, deleteGroup, addMembers, removeMembers, getGroupsForUser, } from './lib/groups.js';
|
|
5
5
|
export { createGrant, listGrants, getGrant, revokeGrant, consumeGrant, removeGrantsByPredicate, removeGrantsByPrincipal, } from './lib/grants.js';
|
|
6
6
|
export { checkAccess } from './lib/authz.js';
|
|
7
|
+
export { tunnelInfoFromState } from './lib/tunnels.js';
|
|
7
8
|
export { getAccessRequestTemplates, buildAccessRequestPage } from './lib/templates.js';
|
|
8
9
|
export { migrateFromLegacy } from './lib/migration.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGlF,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,aAAa,EACb,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGlF,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,aAAa,EACb,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -6,6 +6,8 @@ export { createGroup, listGroups, getGroup, updateGroup, deleteGroup, addMembers
|
|
|
6
6
|
export { createGrant, listGrants, getGrant, revokeGrant, consumeGrant, removeGrantsByPredicate, removeGrantsByPrincipal, } from './lib/grants.js';
|
|
7
7
|
// Authorization
|
|
8
8
|
export { checkAccess } from './lib/authz.js';
|
|
9
|
+
// The tunnels Gatekeeper authorizes, as it reads them from tunnels.json
|
|
10
|
+
export { tunnelInfoFromState } from './lib/tunnels.js';
|
|
9
11
|
// Templates
|
|
10
12
|
export { getAccessRequestTemplates, buildAccessRequestPage } from './lib/templates.js';
|
|
11
13
|
// Migration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAyBA,YAAY;AACZ,OAAO,EACL,eAAe,EACf,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAI5B,SAAS;AACT,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,aAAa,EACb,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAEzB,SAAS;AACT,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAEzB,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,wEAAwE;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,YAAY;AACZ,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEvF,YAAY;AACZ,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { Grant, GrantState, CreateGrantOptions, GrantFilter } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Run `fn` holding the grants lock. A caller that also holds the groups
|
|
4
|
+
* lock takes that one first (`withGroupLock`, then this) — the order every
|
|
5
|
+
* cascade uses.
|
|
6
|
+
*/
|
|
7
|
+
export declare function withGrantLock<T>(fn: () => Promise<T>): Promise<T>;
|
|
2
8
|
export declare function createGrant(options: CreateGrantOptions, initialState?: {
|
|
3
9
|
used?: boolean;
|
|
4
10
|
createdAt?: string;
|