Skip to content

[Security] Cross-platform credential storage + API key management UI #6

@jackby03

Description

@jackby03

Summary

API keys are stored using Windows DPAPI (WindowsDpapiCryptographyService), which only works on Windows. The abstraction ICryptographyService exists but there is no cross-platform fallback and no path to add exchange credentials from the UI.

What needs to be done

  • Add macOS/Linux fallback using AesGcm + a machine-derived key stored in the user's config folder
  • Add a settings dialog panel in the GUI:
    • List of saved exchange credentials (masked key display)
    • Add / Edit / Delete credential
    • Select active credential
  • Validate credential by making a test call to GET /api/v3/account before saving
  • Never log or expose raw API keys in console output

Security rules

  • Keys must never be stored in plain text
  • Keys must never appear in logs, crash reports, or event bus messages
  • Use SecureString for in-memory handling where feasible

Acceptance criteria

  • WindowsDpapiCryptographyService is used on Windows
  • AesGcmCryptographyService is used on macOS and Linux
  • Settings dialog allows adding/editing/deleting credentials
  • Credential is validated via Binance API before saving
  • No raw keys in any log output

References

  • src/Omnijure.Core/Shared/Infrastructure/Security/
  • src/Omnijure.Core/Features/Settings/Model/ExchangeCredential.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions