Password Vault
Weavestream includes a full-featured password vault per tenant. Credentials are encrypted at rest, version-controlled, and protected by role-based access — without any dependency on an external secrets manager.
Credential Storage
Each Password record stores:
The create and edit dialog presents fields in a consistent order: name, username, password (with generator and strength meter), URL, TOTP, notes, expiry date, and tags. Tags are managed with an inline chip input — type to create a new tag or select an existing one. The URL field sits below the password field so the credential itself is always visible first.
Encryption
Credentials use envelope encryption:
- Each secret is encrypted with AES-256-GCM using the key identified by
PASSWORD_ENCRYPTION_KEY_KID. - Ciphertext blobs are stamped with the
kidso that key rotation is non-destructive. - After rotating to a new key, old blobs decrypt seamlessly via
PASSWORD_PREVIOUS_KEYSand re-encrypt under the current key on the next update. - The
reencrypt-passwordsCLI command can bulk-migrate all blobs to the current key.
See Key Rotation for the rotation procedure.
TOTP Support
Passwords can store a TOTP secret for services that use authenticator-app two-factor auth. The vault:
- Generates and displays the current 6-digit code with a countdown timer
- Supports SHA1, SHA256, and SHA512 algorithms
- Stores the TOTP secret encrypted alongside the password
Password Generator
The built-in generator is local and offline — nothing is sent to a server. Three modes:
Generator defaults (minimum length, character classes, word count) can be set workspace-wide from Admin → Settings.
Strength Meter
Password entry fields display a real-time strength score powered by zxcvbn-ts. The meter shows:
- A 0–4 score (Very Weak → Very Strong)
- A human-readable warning (e.g. "This is a top-10 common password")
- Improvement suggestions
Breach Detection
On every create or update, the worker performs a HaveIBeenPwned k-anonymity lookup:
- SHA-1 hash the candidate password.
- Send only the first 5 hex characters to
api.pwnedpasswords.com. - Compare the returned suffix list locally.
Only 5 characters leave the server — the full password is never transmitted. Toggle this check with HIBP_ENABLED=false in .env if your deployment cannot reach the HIBP API.
Version History
Every change to a password is stored as an immutable PasswordVersion record capturing:
- The values of all fields at that point (name, username, URL, and the encrypted password, notes and TOTP secret)
- Which fields actually changed. A field is flagged only when its value differs: re-saving a form with unchanged notes, password or TOTP does not create a change entry. Two deliberate exceptions, so that saving can never confirm a guessed secret: an API key or MCP connection without reveal access gets every notes, password or TOTP value it sends recorded as changed, and on a credential that requires a reason to view, a re-sent password or TOTP secret is always recorded as changed. Versions saved before this behaviour was introduced keep the change markers they were recorded with
- The actor, optional reason, and timestamp
The history panel shows the captured name, username and URL for every version and highlights the ones that changed, so earlier usernames can be read straight from the list. Notes, passwords and TOTP secrets are encrypted and are never listed; the password can be revealed per version with the usual permission and reason rules.
Client-portal users (CLIENT_USER) never receive the captured name, username or URL from the history API, even for a password shared with clients: it may have had an internal name or username before it was shared. They see the same metadata as before (version, changed fields, actor, reason and time).
Restoring
Restoring is forward-only: it appends a new version and keeps the current one in history. You can restore a whole version, or one field at a time (Restore this username / URL / name). A per-field restore changes only that field; everything else, including the password, keeps its current value. The API accepts an optional fields array (name, username, url, notes, password, totp) on POST /companies/:companyId/passwords/:id/versions/:version/restore; omitting it restores the whole version. Restores need the same permission as editing, are refused on archived passwords, and are audited as password.version.restored with the field names only, never values. Restoring the password on its own needs access to reveal it without a reason, because its new strength score is computed against the current name, username and URL. Anyone else can restore the whole version. If the password changes while a save or restore is running, the request fails with a conflict instead of mixing the two changes.
Version history cannot be deleted. Archived passwords retain their history.
Access Restrictions
Per-password controls:
- Visible to clients — whether the password appears in the client portal
- Reason to view — prompt the user for a justification before revealing the secret
- Internal access — restrict which internal (non-client) users can see the credential at all
Internal Access
On a default installation, a credential without its own access list is visible to every internal user with access to the company. The global policy and company membership overrides described below can narrow that access. You can also give a credential its own selected list, managed from the Internal access panel on the password detail page.
The restriction governs visibility, not just reveal: users who are not on the list do not see the credential in lists, cannot open its detail page, and cannot reveal it. The eligible-user list is derived server-side from people who already have a path to the company — super admins (always included), members (operators and contractors with an active, unexpired membership), and operators with global access. Super admins always retain access regardless of the list.
Managing internal access requires write access to the company plus the membership-management permission; the API rejects any attempt to add a user who is not an eligible internal user for that company.
Global Password Access Policy
A workspace-wide policy (Settings → Passwords → Password access) decides who can open credentials that have no own internal-access list:
Rules:
- A credential with its own internal-access list uses only that list. The global policy does not apply to it, so the list can give access to a user who is not in the global list.
- Super admins always have access. Client users are governed only by Visible to clients.
- The policy never gives company access. A selected user still needs a membership or global access for the company.
- The server checks the policy when a credential is read. Changing it does not change any credential.
- A user without access does not see the credential anywhere: lists, detail pages, search (including file names of its attachments), stars, related items, PDF exports, and MCP or API-key access, which act as their owner.
- A user without effective password access in that company (after membership overrides) cannot create a credential without its own list.
Changing the policy requires the settings-management permission, step-up authentication, and an interactive session. Each change is audited as settings.password_access_policy.change, with the before and after user IDs.
Use Manage users to search by name or email and edit the selection, then Apply to return to settings. Save password access persists the policy; Apply alone does not. The list accepts up to 500 operators and contractors. Remove unavailable users before saving a selected-users policy. Switching to All internal users retains the saved eligible-user list for later. Changes take effect on the saving API replica immediately and on other replicas within the five-second settings cache lifetime.
Company Password Access Override
An admin can change the global policy for 1 user in 1 company. The setting is on the user's membership, on the company Members page (or the Companies list on the user's detail page):
Rule order, most specific first:
- A credential with its own internal-access list uses only that list.
- An active membership with Allow or Deny decides for its company.
- Otherwise, the global policy decides.
Super admins always have access. Client users cannot have an override; Visible to clients governs them.
- To give an override to an operator with global access, add the operator as a member of the company. The membership role then also applies in that company, as for every membership.
- An override ends when its membership expires or is revoked. The user then goes back to the global policy. A revoked membership that is added again starts from Use global policy.
- Bulk adds always create Use global policy.
- The override applies everywhere the global policy applies: lists, detail pages, search, stars, related items, PDF exports, MCP, and API keys.
These membership changes need step-up authentication and an interactive session, because they change password access:
- Add a member with Allow or Deny.
- Change the override.
- Change the expiry of a membership with Allow or Deny.
- Revoke a membership with Allow or Deny.
A role-only change needs no step-up. The membership.create, membership.update, and membership.revoke audit entries include passwordAccess in the before and after values.
Reveal Audit Trail
Every time a credential's secret is decrypted and displayed, an entry is written to the audit log with the actor, timestamp, and IP address. This creates a tamper-resistant record of who accessed each credential and when.
Expiration Tracking
Passwords with an expiry date appear in the Expirations dashboard (/admin/expirations) alongside asset and domain expirations.
Password Folders
Credentials are organised into a hierarchical folder tree per tenant. Folders can be nested to any depth.
Folder Settings
Each folder has a settings dialog (gear icon next to the folder name in the sidebar) that lets you:
- Rename — update the folder's display name in place
- Archive — soft-archive the folder and all credentials inside it. Archived folders are hidden from the default view but remain accessible via the Show archived toggle at the top of the passwords browser
Archiving a folder does not delete any data. Credentials retain their version history and can be unarchived at any time.
Linked Items & Attachments
Passwords can be linked to articles and assets using the same relations system used elsewhere in Weavestream.
- Open a password's detail panel and switch to the Linked items tab
- Search for and link any article or asset in the same company
- Links are bidirectional — the linked article or asset will also show the password in its own relations panel
- File attachments can be added directly from the password detail view, alongside the existing credential fields
PDF Export
Users with the EXPORT_CREATE capability (including super admins) can request a company's vault-archive PDF. The worker builds it in the background; download it when the job completes. Only password entries, their attachments, and their related-item links that the requester may read are included. The worker reads the current global policy and company membership overrides when gathering the data. Including plaintext passwords requires step-up authentication, as does downloading the PDF.
Only the requester or a super admin can view the job status and download its file. A job queued before requester tracking was introduced omits password entries and their attachments when processed by the updated worker; only super admins can retrieve that legacy job. Request a new export if needed. Use exports for secure offline archival, handover documents, or audit evidence.
Embedded Passwords
Passwords can be attached directly to asset records. When an asset is archived, its embedded passwords are automatically soft-archived too.