Skip to main content

Auth Vault

The Auth Vault provides secure credential storage for authentication workflows. Credentials are always encrypted at rest using AES-256-GCM, and the LLM never sees passwords - only profile names.

Quick Start

Commands

Save Auth Profile

Store credentials for later use:

Login with Profile

Navigate to login page and automatically fill credentials:
This command:
  1. Navigates to the profile’s URL
  2. Fills username and password fields
  3. Clicks the submit button
  4. Updates lastLoginAt timestamp

List Profiles

View all saved auth profiles:
Output:

Show Profile Details

View details for a specific profile (without password):

Delete Profile

Remove a stored auth profile:

Storage Location

Auth profiles are stored at:
Each profile file:
  • Has 0600 permissions (owner read/write only)
  • Is encrypted with AES-256-GCM
  • Contains username, password, URL, and selectors

Encryption

Automatic Encryption Key

If no encryption key is configured, agent-browser automatically generates one on first use:
This file:
  • Contains a 256-bit random key (64 hex characters)
  • Has 0600 permissions (owner read/write only)
  • Is used for all encryption operations

Manual Encryption Key

For production deployments, set an explicit encryption key:

Encryption Algorithm

  • Algorithm: AES-256-GCM
  • Key size: 256 bits (32 bytes)
  • IV size: 96 bits (12 bytes)
  • Authentication: AEAD with GCM auth tag
Auth profiles are stored as JSON with this structure:

Decrypted Data Structure

The decrypted data contains:

Custom Selectors

By default, auth profiles use standard selectors:
  • Username: input[type="text"], input[type="email"]
  • Password: input[type="password"]
  • Submit: button[type="submit"], input[type="submit"]
For non-standard login forms, specify custom selectors:

Profile Naming

Profile names must contain only:
  • Alphanumeric characters (a-z, A-Z, 0-9)
  • Hyphens (-)
  • Underscores (_)
Invalid characters are rejected to prevent directory traversal attacks.

Security Best Practices

1. Always Use stdin for Passwords

Never pass passwords as command-line arguments (they appear in shell history):

2. Backup Your Encryption Key

If you lose the encryption key, encrypted profiles cannot be recovered:

3. Use Unique Keys Per Environment

Don’t share encryption keys between development, staging, and production:

4. Rotate Keys Periodically

To rotate keys:

Programmatic API

Auth profiles can also be managed via the Node.js API:

Environment Variables

VariableDescriptionExample
AGENT_BROWSER_ENCRYPTION_KEY64-character hex encryption key for AES-256-GCMopenssl rand -hex 32
If not set, a key is auto-generated at ~/.agent-browser/.encryption-key.

Troubleshooting

Encryption key required error

Solution: The profile was encrypted with a key that’s no longer available. Either:
  1. Restore the original key file or environment variable
  2. Delete the profile and re-create it

Invalid auth profile name error

Solution: Use only alphanumeric characters, hyphens, and underscores in profile names.

Login fails with custom selectors

If auth login fails to find elements:
  1. Open the login page in headed mode:
  2. Inspect the page and identify correct selectors:
  3. Update the profile with correct selectors:

See Also