PasswordManagerPage.hpp

1. Overview

The PasswordManagerPage.hpp file is a Password-manager main page interface in BastionGuard.

Declares the GTKmm page coordinating vault lock state, search, add/import/export-related actions, entry rows, logging, and lifetime-safe callbacks.

The documentation below is generated from the supplied source and covers its API surface, runtime responsibilities, data flow, filesystem or command interactions, concurrency model, and security considerations.


2. Source Inventory

  • Original path: password_manager/PasswordManagerPage.hpp
  • Language: C++
  • Source type: .hpp
  • Line count: 87
  • SHA-256: 6c247e0fd1eb9d9af9e5d2ebdb6136aeb2941d1aec81df103c7051b067c1d9da

3. Dependencies

The file declares the following compile-time dependencies:

Project

  • PasswordVault.hpp
  • PasswordEntry.hpp
  • PasswordSearchRow.hpp
  • ../LifetimeGuard.hpp

GTK/GLib

  • gtkmm.h

C/C++ Runtime

  • vector

4. Types and Public Contract

The file declares or implements the following principal types:

  • Class: PasswordManagerPage

Declared Public Members

  • PasswordManagerPage();
  • ~PasswordManagerPage() override;

5. API and Method Inventory

The file contains no out-of-line function implementation. Its behavior is supplied by declarations, inline functions, or associated implementation files.


6. Functional Architecture

Page Layout

  • Provides a security banner, vault-state controls, action toolbar, search box, scrollable entry list, and operation log.
  • Exposes actions for unlock/lock, new record, CSV import, vault view/export, refresh, and complete deletion.
  • Uses expandable PasswordSearchRow widgets for each record.

Vault Lifecycle

  • Initializes the vault and distinguishes first-run master-password creation from normal unlock.
  • Disables secret-dependent actions while locked.
  • Reloads metadata after add, edit, import, or delete operations.
  • Uses a lifetime flag for delayed and idle callbacks.

7. Operational Flow

  1. Initialize the password-manager storage directory and metadata index.
  2. Create or verify the master password and transition the vault into unlocked state.
  3. Load non-secret metadata and asynchronously populate the decrypted secret cache.
  4. Perform add, edit, reveal, import, export, or delete actions.
  5. Persist metadata atomically and rewrite the encrypted secret map.
  6. Clear cached secrets and master-password material when locking.

8. Filesystem and External Command Surface

No hard-coded absolute filesystem path is declared directly in this file.

Commands or Security Primitives Referenced

  • sh

9. Concurrency and Lifecycle

  • Uses a lifetime guard so delayed callbacks do not access a destroyed widget.

10. Security Considerations

  • Password metadata and encrypted secrets are separated, reducing accidental exposure through the index file.
  • Cleartext passwords exist in process memory while the vault is unlocked and during import/export workflows.
  • CSV import and export files are unencrypted and must be handled as sensitive data.
  • Background callbacks must not outlive their owning GTK objects.

11. Implementation Considerations

  • This header defines the public or private class contract; behavior is implemented by the matching .cpp file unless marked inline.

12. Licensing and Branding

The source is distributed under the GNU General Public License version 3.

The source header identifies BastionGuard™ as a trademark and states that the name and branding are not licensed under the GPL.

The software is provided without warranty, including implied warranties of merchantability or fitness for a particular purpose.