Skip to content

INDIW33D/firepass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FirePass

A Firefox password manager extension powered by pass (the standard Unix password manager).

Overview

FirePass bridges your Firefox browser with your existing pass password store, allowing you to:

  • πŸ” Access your passwords directly from Firefox
  • πŸ” Search and filter credentials
  • ✨ Auto-fill login forms
  • βž• Save new credentials to your pass store
  • 🎲 Generate secure passwords
  • ⌨️ Use keyboard shortcuts for quick access

Architecture

The project consists of two main components:

  1. Firefox Extension (extension/) - Vue 3 based browser extension
  2. Native Host (backend/) - Go application that communicates with pass

Prerequisites

  • pass installed and configured with GPG
  • Go 1.21+ (for building the native host)
  • Node.js 18+ (for building the extension)
  • Firefox 91+

Installation

Quick Install

# Clone the repository
git clone https://github.com/yourusername/firepass.git
cd firepass

# Build everything
make build

# Install the native messaging host
make install-native-host

Manual Installation

1. Build the Native Host

cd backend
go build -o firepass ./cmd/main

2. Install the Native Host

Copy the binary to a location in your PATH:

sudo cp firepass /usr/local/bin/
# or for user-local installation:
mkdir -p ~/.local/bin
cp firepass ~/.local/bin/

Create the native messaging manifest:

mkdir -p ~/.mozilla/native-messaging-hosts/

# Edit the path in the manifest to point to your firepass binary
cat > ~/.mozilla/native-messaging-hosts/com.firepass.host.json << EOF
{
  "name": "com.firepass.host",
  "description": "FirePass Native Messaging Host",
  "path": "/usr/local/bin/firepass",
  "type": "stdio",
  "allowed_extensions": [
    "firepass@example.com"
  ]
}
EOF

3. Build the Extension

cd extension
npm install
npm run build

4. Load the Extension in Firefox

  1. Open Firefox and navigate to about:debugging
  2. Click "This Firefox" in the sidebar
  3. Click "Load Temporary Add-on..."
  4. Navigate to extension/dist/ and select manifest.json

For permanent installation, you'll need to sign the extension through Mozilla Add-ons.

Usage

Popup Interface

Click the FirePass icon in your toolbar to:

  • View credentials for the current website
  • Search all stored passwords
  • Add new credentials
  • Copy passwords to clipboard

Keyboard Shortcuts

Shortcut Action
Ctrl+Shift+P / Cmd+Shift+P Open FirePass popup
Ctrl+Shift+L / Cmd+Shift+L Auto-fill credentials

Pass Store Format

FirePass reads and writes credentials in the standard pass format:

mysecretpassword
username: user@example.com
url: https://example.com
notes: Additional notes here

The first line is always the password. Subsequent lines can contain metadata in key: value format.

Development

Backend Development

cd backend

# Run tests
go test ./...

# Build
go build -o firepass ./cmd/main

# Format code
go fmt ./...

Extension Development

cd extension

# Install dependencies
npm install

# Development mode with hot reload
npm run dev

# Build for production
npm run build

# Lint code
npm run lint

Project Structure

firepass/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ cmd/
β”‚   β”‚   └── main/
β”‚   β”‚       └── main.go              # Entry point
β”‚   β”œβ”€β”€ internal/
β”‚   β”‚   β”œβ”€β”€ domain/
β”‚   β”‚   β”‚   β”œβ”€β”€ credential/          # Credential aggregate
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ credential.go    # Entity and value objects
β”‚   β”‚   β”‚   β”‚   └── repository.go    # Repository interface
β”‚   β”‚   β”‚   └── errors.go            # Domain errors
β”‚   β”‚   β”œβ”€β”€ application/
β”‚   β”‚   β”‚   β”œβ”€β”€ dto/
β”‚   β”‚   β”‚   β”‚   └── messages.go      # Data transfer objects
β”‚   β”‚   β”‚   └── service/
β”‚   β”‚   β”‚       └── credential_service.go  # Application services
β”‚   β”‚   └── infrastructure/
β”‚   β”‚       β”œβ”€β”€ pass/
β”‚   β”‚       β”‚   └── repository.go    # Pass store implementation
β”‚   β”‚       └── messaging/
β”‚   β”‚           └── handler.go       # Native messaging handler
β”‚   β”œβ”€β”€ native-messaging/
β”‚   β”‚   └── com.firepass.host.json   # Manifest template
β”‚   └── go.mod
β”œβ”€β”€ extension/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ popup/                   # Vue popup UI
β”‚   β”‚   β”‚   β”œβ”€β”€ components/          # Vue components
β”‚   β”‚   β”‚   β”œβ”€β”€ services/            # Messaging service
β”‚   β”‚   β”‚   β”œβ”€β”€ App.vue
β”‚   β”‚   β”‚   β”œβ”€β”€ main.js
β”‚   β”‚   β”‚   └── index.html
β”‚   β”‚   β”œβ”€β”€ background/
β”‚   β”‚   β”‚   └── background.js        # Background script
β”‚   β”‚   └── content/
β”‚   β”‚       └── content.js           # Content script for autofill
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   β”œβ”€β”€ manifest.json            # Firefox manifest
β”‚   β”‚   └── icons/
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.js
β”œβ”€β”€ Makefile
└── README.md

Security Considerations

  • GPG Integration: FirePass relies on your existing GPG setup. Ensure your GPG agent is properly configured.
  • Clipboard: Passwords copied to clipboard are automatically cleared after a configurable timeout (default: 30 seconds).
  • Native Messaging: Communication between the extension and native host uses Firefox's secure native messaging protocol.
  • No Remote Storage: All passwords remain in your local pass store.

Troubleshooting

"Unable to connect to native host"

  1. Verify the native host is installed:

    which firepass
  2. Check the manifest exists:

    cat ~/.mozilla/native-messaging-hosts/com.firepass.host.json
  3. Verify the path in the manifest matches your firepass installation.

  4. Ensure pass is working:

    pass ls

"Password store is not initialized"

Initialize your pass store if you haven't already:

pass init <your-gpg-key-id>

Extension not loading

  • Check the browser console (Ctrl+Shift+J) for error messages
  • Ensure you're loading from the dist/ directory, not src/

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is open source. See LICENSE file for details.

Acknowledgments

  • pass - The standard Unix password manager
  • Vue.js - Progressive JavaScript framework
  • Vite - Next generation frontend tooling

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors