feat: add remote trust and server identity pinning
Testing / remote-protocol-compat (0.16.0) (push) Successful in 1m1s
Testing / remote-protocol-compat (0.15.0) (push) Successful in 1m3s
Testing / test (push) Failing after 1m15s
Build & Publish Package / publish (push) Successful in 51s
Package Extension / package-extension (push) Successful in 1m6s

- Add SSH-style server identity keys and known-host verification for remote serve endpoints.
- Add remote add/list/remove commands for explicit endpoint persistence.
- Fix remote clients listing to fan out through target discovery instead of ambiguous auto-routing.
- Add URL glob matching for tabs filter and count with extension tests.
- Add n8n credential pinning for server public keys or SHA256 fingerprints.
- Remove obsolete compat shim behavior while keeping empty compat seams for future protocol changes.
- Bump browser-cli to 0.16.4 and n8n node to 0.3.1.
- Cover known-hosts, remote registry, compat seams, n8n protocol verification, and URL matching with tests.
This commit is contained in:
2026-06-26 08:53:21 +02:00
parent 1ae9c33f00
commit 6270d8c956
28 changed files with 981 additions and 297 deletions
+26
View File
@@ -44,9 +44,29 @@ Paste the contents of `n8n_key.pem` into the n8n credential.
| Port | `serve` TCP port (default `8765`) |
| Ed25519 Private Key | PKCS8 PEM from `browser-cli auth keygen` (empty only for `--no-auth` loopback) |
| Browser Alias | optional `_route` target — required if the endpoint serves multiple browsers |
| Server Public Key/Fingerprint | pinned `browser-cli serve` identity (`SHA256:...` fingerprint or 64-char server public key hex) |
| Allow Unknown Server Identity | disables SSH-style server pinning; use only for loopback/dev |
| Use TLS | wrap the connection in TLS (only for a TLS-terminating proxy; the protocol is already encrypted) |
| Ignore SSL Issues | when TLS is on, accept a self-signed proxy cert |
### Server identity pinning
Recent `browser-cli serve` versions advertise a persistent Ed25519 server
identity in the challenge frame. The n8n node verifies the challenge signature
and compares the key against the credential's **Server Public Key/Fingerprint**
field, similar to SSH `known_hosts`.
On a trusted machine, pin the server once with the Python CLI and copy the
fingerprint into the n8n credential:
```bash
browser-cli remote trust-host browser-host.example:8765
browser-cli remote known-hosts
```
If the server key changes, the node fails with `REMOTE SERVER IDENTITY CHANGED`.
Only enable **Allow Unknown Server Identity** for local/dev endpoints where you
explicitly do not want pinning.
## Operations
Every operation maps to one raw browser-cli command, each subject to the server
policy tier noted below.
@@ -83,6 +103,12 @@ Use it for anything the typed operations don't cover.
> `extract.markdown` therefore returns the page payload as the extension hands it
> back, not the CLI's rendered Markdown. For clean text use **Extract Text**.
> **Tab → Filter / Count URL Pattern:** matched against the full tab URL. A plain
> string is a case-sensitive substring (`twitch.tv`); a pattern containing `*` or
> `?` is a glob (`twitch.tv/*`, `*.twitch.tv`). Glob needs the serve-side extension
> at **0.16.4+**; older extensions treat the whole pattern as a literal substring,
> so `twitch.tv/*` matches nothing there — use `twitch.tv` instead.
## Develop / build
```bash
cd n8n-nodes-browser-cli