5.9 KiB
5.9 KiB
Usage Guide
Quick Start
1. Install and Run
npm install
npm run dev
Open http://localhost:5173 in your browser.
2. Add Your First Vault Server
- Click "+ Add Server"
- Fill in the form:
- Server Name: e.g., "Production Vault"
- Server URL: e.g., "https://vault.example.com"
- Description: Optional, e.g., "Production environment vault"
- Click "Add Server"
3. Connect to Vault
- Select your server from the list
- Choose authentication method:
- Token: Paste your vault token
- Username & Password: Enter credentials
- LDAP: Enter LDAP credentials
- Click "Connect"
4. Browse Secrets
Read a Secret Directly
- Enter the full path in the "Secret Path" field
- Example:
secret/data/myapp/database
- Example:
- Press Enter or click "Read Secret"
- The secret data will appear below
Search for Secrets
- Click "🔍 Search" button
- Enter a Base Path (where to start searching)
- Example:
secret/
- Example:
- Enter a Search Term
- Example:
database(will find all paths containing "database")
- Example:
- Click "Search"
- Results appear showing:
- 📁 Directories (not clickable)
- 📄 Secrets (clickable to view)
- Click "View" on any secret to read it
5. Configure Settings
Click "⚙️ Settings" to adjust:
Cache Settings
- Enable cache: Toggle caching on/off
- Maximum cache size: How much data to cache (in MB)
- Cache expiration: How long cached data remains valid (in minutes)
Search Settings
- Maximum search depth: How deep to recurse (prevents infinite loops)
- Maximum search results: Limit number of results returned
Cache Statistics
View real-time cache usage:
- Total size of cached data
- Number of cached entries
- Age of oldest/newest entries
- Clear Cache button to reset
Advanced Usage
Understanding the Cache
The cache system prevents excessive API calls to your Vault server:
- First Request: API call is made, result is cached
- Subsequent Requests: Data returned from cache (instant)
- Cache Expiration: After configured time, next request will hit the API again
Cache Key Format: {serverId}:{operation}:{path}
Example: abc-123:list:secret/data/myapp/
Search Behavior
The recursive search:
- Lists all items at the base path
- For each item:
- If it matches the search term, it's added to results
- If it's a directory, recursively search inside it
- Stops when:
- Max depth is reached
- Max results are found
- No more paths to explore
Performance Tips:
- Use specific base paths to limit search scope
- Results are cached, so repeated searches are fast
- Adjust max depth for deep directory structures
Working with Different Auth Methods
Token Authentication
Token: s.1234567890abcdef
Best for: Development, CI/CD, service accounts
Username/Password
Username: john.doe
Password: ••••••••
Best for: Interactive users, testing
LDAP
Username: john.doe
Password: ••••••••
Best for: Enterprise users with LDAP integration
Examples
Example 1: Finding Database Credentials
- Connect to your vault server
- Click "🔍 Search"
- Base Path:
secret/ - Search Term:
database - View results and click on the relevant secret
- Copy the credentials you need
Example 2: Browsing Application Secrets
- Connect to vault
- Enter path:
secret/data/myapp/ - Note the structure
- Navigate to specific secrets:
secret/data/myapp/configsecret/data/myapp/databasesecret/data/myapp/api-keys
Example 3: Managing Cache
- Use the application normally
- Open Settings to view cache stats
- If cache grows too large or contains stale data:
- Adjust cache size limit
- Reduce expiration time
- Or click "Clear Cache"
Troubleshooting
CORS Errors
If you see CORS errors in the console:
- Configure your Vault server to allow CORS
- Add your frontend URL to
cors_allowed_origins - Restart your Vault server
Example Vault config:
listener "tcp" {
cors_enabled = true
cors_allowed_origins = ["http://localhost:5173"]
}
Authentication Fails
- Verify your token/credentials are correct
- Check token hasn't expired
- Ensure you have proper permissions in Vault
- Check Vault server URL is correct
Search Returns No Results
- Verify the base path exists and you have permission to list it
- Try a broader search term
- Check max depth isn't too low
- Ensure secrets exist at that path
Cache Issues
- Clear cache from Settings if data seems stale
- Check cache expiration time isn't too long
- Verify localStorage isn't full (browser limit ~5-10MB)
Best Practices
-
Security:
- Always use HTTPS in production
- Don't share tokens
- Log out when done
- Clear cache if on shared computer
-
Performance:
- Use specific base paths for searches
- Adjust cache settings based on your usage
- Increase cache expiration if secrets change rarely
- Decrease for frequently updated secrets
-
Organization:
- Name servers clearly
- Add descriptions to help identify servers
- Use consistent path naming in Vault
- Structure secrets logically
-
Maintenance:
- Periodically clear cache
- Review cache statistics
- Adjust settings as usage patterns change
- Remove unused vault server configurations
Keyboard Shortcuts
- Enter in Secret Path field: Read the secret
- Enter in Search Term field: Start search
- Esc in Settings modal: Close settings
Data Storage
What's Stored in localStorage:
- ✅ Vault server configurations (name, URL, description)
- ✅ Application settings (cache size, search limits, etc.)
- ✅ Cached API responses (paths, secrets)
What's NOT Stored:
- ❌ Vault tokens
- ❌ Passwords
- ❌ Any credentials
Credentials are only kept in memory during your active session and are lost when you logout or close the tab.