Use runtime-dir Unix sockets for local gRPC
This commit is contained in:
@@ -28,6 +28,20 @@ The browser integration uses:
|
||||
|
||||
The browser feature intentionally stays on the same secure gRPC surface used by other trusted automation.
|
||||
|
||||
## Default Listener
|
||||
|
||||
On desktop KeePassGO listens on a Unix socket by default:
|
||||
|
||||
- primary location: under the user runtime directory
|
||||
- fallback: `/run/user/<uid>` if present
|
||||
- final fallback: a private directory under the system temp directory
|
||||
|
||||
Override the listener with `-grpc-addr` or `KEEPASSGO_GRPC_ADDR`, for example:
|
||||
|
||||
```bash
|
||||
KEEPASSGO_GRPC_ADDR=tcp://127.0.0.1:47777 ./keepassgo
|
||||
```
|
||||
|
||||
## Native Host
|
||||
|
||||
Build the bridge:
|
||||
@@ -45,10 +59,16 @@ Install a Firefox native messaging manifest:
|
||||
Install a Chromium native messaging manifest:
|
||||
|
||||
```bash
|
||||
./keepassgo-browser-bridge install-native-host --browser chromium --binary /absolute/path/to/keepassgo-browser-bridge --extension-id <your-extension-id>
|
||||
./keepassgo-browser-bridge install-native-host --browser chromium --binary /absolute/path/to/keepassgo-browser-bridge --extension-key-file /path/to/chromium-extension-public-key.txt
|
||||
```
|
||||
|
||||
Chrome and Chromium require the actual extension id in the native host manifest.
|
||||
Chrome and Chromium require the actual extension id in the native host manifest. KeePassGO can derive that id from the Chromium manifest public key so you do not have to type it separately.
|
||||
|
||||
For a fixed Chromium ID:
|
||||
|
||||
1. Keep a stable Chromium extension signing key outside the repo.
|
||||
2. Add the corresponding public key to the Chromium manifest as `"key": "<base64-public-key>"`.
|
||||
3. Use the same public key with `install-native-host --extension-key-file ...` so the native host manifest is locked to that stable extension ID.
|
||||
|
||||
## Extension Setup
|
||||
|
||||
@@ -56,7 +76,7 @@ Firefox:
|
||||
|
||||
1. Load `browser/extension/manifest.firefox.json` as a temporary add-on or package it as an extension.
|
||||
2. Open the extension settings page.
|
||||
3. Set the KeePassGO gRPC address, usually `127.0.0.1:47777`.
|
||||
3. Leave the gRPC address blank to use the local default Unix socket, or set an explicit address if you overrode the listener.
|
||||
4. Paste an API token scoped for browser login lookup and credential copy.
|
||||
|
||||
Chromium / Chrome:
|
||||
|
||||
Reference in New Issue
Block a user