Skip to content

Encrypt API Keys with Platform Keyring #13

@Kirti-Rathi

Description

@Kirti-Rathi

Currently, API keys are stored in plain text in the config file (promptshell_config.conf), which poses a security risk—especially if the file is accidentally exposed or synced to the cloud.


Proposed Solution:

  • Use the keyring Python library to securely store API keys in the platform's native keychain.
  • Migration: Detect existing plaintext API keys, prompt user to migrate to secure storage and remove API keys from config after successful migration
  • Error Handling: Handle systems where keyring is unsupported, and show meaningful warnings when secure storage fails

Acceptance Criteria:

  • API keys are no longer stored in config file
  • Keys are saved using system-native keyrings
  • Migrate existing API keys securely
  • setup_wizard() uses secure storage
  • Works across Windows, macOS, and Linux
  • Updated README
  • Unit tests that validate keyring read/write behavior in tests/ folder

Metadata

Metadata

Labels

AdvancedComplex changes needing deep architectural understanding.SSoC25Part of Social Summer of Code 2025. Tag for recognition.enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions