jarmo/secrets-web
حول
Not Yet Another Password Manager self-hosted Web app written in Go using libsodium
الأمان والخصوصيةالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- جارٍ جمع السجل
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلsecrets-web
Self-hosted web interface for secrets. secrets-cli is required for vault creation and user administration; users can activate accounts, manage secrets and change their passwords in the browser.

Installation
Download a binary from releases and put secrets-web in your PATH. Install secrets-cli 9.x or newer on the server. You can also build from source.
Getting started
First create and activate a user using the CLI, then create a vault:
secrets user-create alice
secrets user-activate alice
secrets initialize --vault production
Enter alice when prompted for the vault owner username; initialization does not require her password.
Start the web server with an HTTPS certificate and private key:
secrets-web serve --cert cert.crt --cert-priv-key cert.key
Open https://localhost:9090 and log in as alice with the password chosen during activation. Alice can now view, add, edit and delete secrets in production.
The server requires HTTPS, including when running behind a reverse proxy. Use a trusted certificate, such as one issued by Let's Encrypt, for public deployments.
Reverse proxy
The connection to the web server must use HTTPS. When using a reverse proxy, configure its address explicitly, for example --trusted-proxy=127.0.0.1. Only trust the IP addresses or CIDRs of your actual proxies. Configure the edge proxy to overwrite untrusted forwarded headers and restrict direct access to the server.
For Internet-facing deployments, use additional connection and request rate limits at the reverse proxy.
Adding users and vaults
An administrator creates Bob's account with the CLI:
secrets user-create bob
Give Bob the one-time setup code securely. Bob opens /activate in the web app, enters his username and code, and chooses his own password (12–1,024 bytes). The code expires after 48 hours.
Once Bob has activated his account, grant him access from the CLI:
secrets user-add bob --vault production
Enter Alice's username and password when prompted by user-add. Bob can then log in with his own username and password. To create more vaults, use secrets initialize and grant existing users access with secrets user-add.
After login, the app shows each user's accessible vaults; if there is only one, it opens directly. The Settings page lets users change their password for every vault they can access. No password recovery is provided.
Usernames are case-insensitive. Sessions expire after 15 minutes of inactivity. Refreshing or closing a tab, or opening the app in a new tab, requires a new login. Closing a secret editor discards unsaved edits.
Configuration
By default, CLI and web use the same locations:
| Setting | Default |
|---|---|
| Configuration | ~/.config/secrets/config.json |
| Vaults | ~/.config/secrets/vaults |
| User accounts | ~/.config/secrets/users |
Both respect XDG_CONFIG_HOME. The optional config.json must not be group- or world-writable (use 0644 or 0600) and accepts only VaultsDir and UsersDir, both absolute paths:
{
"VaultsDir": "/var/data/vaults",
"UsersDir": "/var/data/users"
}
Omitted or empty properties use their defaults. Vaults are discovered automatically from regular, visible .json files directly inside VaultsDir; the filename without .json is the vault name and URL segment. Create explicitly configured directories before use. Use --config to select a different configuration file, --users-dir to override UsersDir, or --vaults-dir to override VaultsDir. The server uses command-line overrides before configuration values and defaults. --vaults-dir requires an absolute path to an existing directory. The CLI configuration is not modified; make sure CLI administration (especially user-destroy) uses the same active vault directory. If the server runs as a different OS user from the CLI, make sure both processes can access the intended configuration, user data and vault files, without making sensitive files publicly readable.
See the filesystem requirements, including Windows storage requirements.
Use secrets-web --help for all options, including host, port and PID file. When using --pid, choose a service-owned directory and remove stale PID files only after confirming the server has stopped. Check the installed version with secrets-web --version.
Logging
The server writes structured diagnostics to stderr. By default, it logs startup, write requests, rejected requests and server errors. Use --debug to include successful reads. Sensitive request data and secret contents are not logged. Request IDs are available in the logs and X-Request-ID response header for troubleshooting.
Protect logs and configure any external proxies or monitoring systems not to log sensitive request data or request and response bodies.
Passkeys
Passkeys are optional. Enable them with a stable, trusted origin, for example:
secrets-web serve --cert cert.crt --cert-priv-key cert.key --webauthn-origin https://secrets.example.com
The origin must match the browser URL (including any non-default port). Passkeys require a compatible WebAuthn PRF authenticator, not just ordinary WebAuthn support. Fingerprint, facial recognition, device PIN and security keys are all possible depending on the browser and credential provider. Password login remains available if the device does not support PRF.
Log in with your password and open Settings to add a named passkey. Adding or removing a passkey requires your current password.
After 30 days without password verification, passkey login displays a reminder. You may skip it, but it will return on subsequent overdue logins. Changing your password through CLI or web revokes all enrolled passkeys; log in with the new password to enroll them again.
Passkeys cannot reset a forgotten password. If you forget it but still have passkey access, use that access to recover your secrets while you can. There is no administrator override.
Security and backups
Run the server under a dedicated OS account with access to the required files. Protect its configuration, TLS keys and process memory: unlocked keys and secrets are held in memory while in use. Disable core dumps and protect or disable swap where practical. Do not treat usernames or passkey enrollment status as private information.
All vault members have equal privileges. Back up vault files and account data; passkey records are optional for password-based recovery. Read the security and backup guidance and credential compromise and recovery guide.
Development
Install the Go and Node.js versions specified in .tool-versions:
git clone https://github.com/jarmo/secrets-web.git
cd secrets-web
make test
make test runs Go tests, go vet and JavaScript tests. No npm dependencies are required. Use make race for race detection (requires CGO and a compatible C compiler) and make vulncheck for vulnerability scanning (requires network access). When changing dependencies, commit the regenerated vendor files.
For an isolated development setup, create a local user and vault with the CLI:
export XDG_CONFIG_HOME="$(pwd)/tmp"
mkdir -p "$XDG_CONFIG_HOME"
secrets user-create dev
secrets user-activate dev
secrets initialize --vault dev
Enter dev when prompted for the vault owner username.
Install fswatch for automatic restarts, then run:
make dev
Open http://localhost:8080 and log in as dev. This HTTP address is for local development only; use HTTPS in deployments.
To test passkeys locally, run the following instead of make dev with the same test configuration:
go run -mod=vendor . serve --cert none --cert-priv-key none --port 8080 --webauthn-origin http://localhost:8080
Open exactly http://localhost:8080 in a compatible browser.
Build and install:
make
make install
To publish a release, bump VERSION in secrets-web.go, commit the change, set GITHUB_RELEASE_TOKEN to a token with repository Contents write permission and run make release. It runs the required checks and creates the GitHub tag automatically.
Release verification
Release archives include SHA-512 checksums. From the download directory, substitute the actual filename:
shasum -a 512 -c archive.zip.sha512
Checksums verify integrity, not publisher authenticity. Alternatively, build from a trusted source revision.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…