Documentation

Everything you need to know about using PlainVault.

What is PlainVault?

PlainVault is a secure internal vault for teams to store and share secrets, configuration files, and secure notes. All content is encrypted with AES-256-GCM and access is controlled by role-based permissions.

Common use cases:

  • Database connection strings and credentials
  • API keys for third-party services
  • Environment variable configurations (env files)
  • SSL certificates and private keys
  • Team notes with sensitive information
  • Infrastructure configuration (docker-compose, kubernetes configs)

How access works

1

Request an account from your administrator — go to the registration page and fill in your name, email, and password

2

Wait for approval — your administrator will receive your request and approve or reject it. You cannot log in until your account is activated.

3

Sign in and start managing files — once approved, log in and browse, create, or edit vault files based on your role

New to PlainVault? Check out the Get Started guide for installation instructions.

Roles & Permissions

PlainVault uses three roles with progressively scoped access. Administrators assign roles during user approval.

FeatureADMINDEVELOPERVIEWER
View file (raw)
View file (masked)
Create file
Edit file
Delete file
Manage categories
Approve/reject users
Create/revoke API keys
View audit logs
View revision history

ADMIN

Full access to all features. Manages files, categories, users, API keys, and audit logs. Can approve or reject new user registrations and revoke access at any time.

DEVELOPER

Can create and edit files, use API keys for programmatic access, and view revision history. Cannot delete files or manage users and categories.

VIEWER

Read-only access with automatic secret masking. Sensitive values like KEY=value are displayed as KEY=********. Ideal for auditors and stakeholders.

File Management

Files are the core unit in PlainVault. Each file stores encrypted content with a title, filename, and content type.

Creating a File

  1. Navigate to the Dashboard
  2. Click the "New File" button
  3. Enter a title (human-readable display name)
  4. Set a file name (e.g. .env.production)
  5. Choose a content type — this affects how secrets are masked
  6. Optionally assign a category for organization
  7. Paste or type your content and click Save

Viewing a File

  • Click any file title in the dashboard list to open its detail page
  • DEVELOPER / ADMIN — sees full raw content with all values visible
  • VIEWER — sees masked content where sensitive values are replaced with ********
  • Click the "RAW" button to view unformatted content (DEVELOPER/ADMIN only)

Editing a File

  1. Open the file detail page and click "Edit"
  2. Modify the content in the editor
  3. Enter a change summary (required) — describe what changed and why
  4. Click Save — a new revision is automatically created

Every edit creates a new revision. The previous version is never lost and can be restored from History.

Deleting a File

  • Only ADMIN role can delete files
  • Open the file detail page and click "Delete"
  • Confirm the deletion in the dialog
Deletion hides the file from the interface (soft delete). File data and revision history remain in the database.

Content Types

textmarkdownenvjsonyamlxmlsql

The content type determines how PlainVault masks sensitive values for VIEWER users:

TypeMasking Behavior
envMasks KEY=value pairs line by line
textMasks KEY=value pairs line by line (same as env)
jsonGeneral pattern detection for sensitive values (keys, tokens, URLs)
yamlGeneral pattern detection for sensitive values (keys, tokens, URLs)
xml, sql, markdownGeneral pattern detection for sensitive values (keys, tokens, URLs)

Categories

Organize files with color-coded labels. Only ADMIN can create, edit, and delete categories.

Managing Categories

  1. Click your role badge in the top-right corner → Categories
  2. Click "New Category"
  3. Enter a descriptive name (e.g. "Production", "AWS Credentials")
  4. Pick a color to visually distinguish it in the file list
  5. Click Create
ProductionDevelopmentSecretsConfigNotes
A category that has files assigned to it cannot be deleted. Remove all files from the category first, or reassign them to a different category.

Assigning Files to Categories

  • When creating a file — select a category from the dropdown
  • When editing a file — change the category in the edit form
  • Files can exist without a category (uncategorized)
  • Use the category chips above the file list to filter by category

History & Revisions

Every file edit creates a revision. Browse, compare, and restore previous versions.

Browsing Revisions

  1. Open a file detail page
  2. Click the "History" button
  3. A timeline of all revisions appears, newest first
  4. Click any revision to view its full content

Only DEVELOPER and ADMIN roles can access revision history.

Comparing Revisions

  1. Open the revision history panel
  2. Click one revision to select it
  3. Cmd+Click (Mac) or Ctrl+Click (Windows/Linux) to select a second revision
  4. Click "Compare" to see the diff

The diff view shows:

+ Added line here

- Removed line here

  Unchanged line

Restoring a Previous Version

  1. Open the revision you want to restore
  2. Click "Restore" to apply it as the current version
  3. Enter a change summary (e.g. "Reverted to v3 config")
  4. The restoration itself creates a new revision — the history is never lost

API Keys

Access files programmatically via REST API using bearer token authentication. Only ADMIN can create and revoke keys.

Creating an API Key

  1. Click your role badge in the top-right corner → API Keys
  2. Click "Create Key"
  3. Give it a descriptive name (e.g. "CI/CD Pipeline", "Dev Environment")
  4. Optionally set an expiration date
  5. Click Create — the key is displayed only once
Copy the key immediately. It cannot be retrieved after the dialog is closed.

Using API Keys

Include the key in the Authorization header of your HTTP requests:

Authorization: Bearer secvault_abc123

Scopes:

  • files:read — list files and read metadata/content
  • files:write — create and update files
  • files:read_raw — download raw decrypted content

Example with curl:

curl -H "Authorization: Bearer your_key_here" \

http://localhost:13000/api/v1/files/{id}/raw

Revoking a Key

  1. Navigate to API Keys from the admin menu
  2. Find the key you want to revoke
  3. Click "Revoke"
  4. The key is immediately invalidated — any requests using it will be rejected

Security

How PlainVault protects your data.

Encryption at Rest

All file content is encrypted with AES-256-GCM before being stored in the database. Each file uses a unique salt and IV derived from a master key via PBKDF2 (100,000 iterations). Even if the database is compromised, content cannot be read without the encryption key.

Secret Masking

VIEWER role users see automatically masked content. Sensitive patterns like KEY=value are replaced with KEY=********.

Raw (DEVELOPER / ADMIN)

DATABASE_URL=postgres://user:secret@db:5432

API_KEY=sk_live_abcdef123456

Masked (VIEWER)

DATABASE_URL=********

API_KEY=********

API Key Security

  • API keys are hashed with SHA-256 before storage — the raw key is never stored in the database
  • Keys are displayed only once at creation time
  • Keys can have an optional expiration date
  • Revoked keys are immediately invalidated

Audit Trail

Every action is logged for compliance and security reviews. The audit trail captures:

  • User login and logout events
  • File creation, viewing, editing, and deletion
  • Category management operations
  • User approval and rejection decisions
  • API key creation and revocation

Only ADMIN role can view audit logs.