Skip to content

feat: secure passwords (#193)#194

Merged
andrinoff merged 2 commits intofloatpane:masterfrom
andrinoff:feat/secure-passwords
Feb 25, 2026
Merged

feat: secure passwords (#193)#194
andrinoff merged 2 commits intofloatpane:masterfrom
andrinoff:feat/secure-passwords

Conversation

@andrinoff
Copy link
Copy Markdown
Member

@andrinoff andrinoff commented Feb 24, 2026

Closes #193

Changes:

  1. Password storing:

Previously all passwords were kept in the form of:

{
  "accounts": [
    {
      "id": "unique-id-1",
      "name": "John Doe",
      "email": "drew@floatpane.com",
      "password": "this-isss-inse-cure",
      "service_provider": "gmail",
      "fetch_email": "john@gmail.com"
    },
    {
      "id": "unique-id-2",
      "name": "Work Email",
      "email": "john@floatpane.com",
      "password": "some-pass-word-easy",
      "service_provider": "custom",
      "fetch_email": "john@company.com",
      "imap_server": "imap.company.com",
      "imap_port": 993,
      "smtp_server": "smtp.company.com",
      "smtp_port": 587
    }
  ]
}

Where passwords were kept as plaintext.

Now, using the go-keyring library, we store the passwords in the OS keyring securely.

New config file:

{
  "accounts": [
    {
      "id": "54053bcf-79dd-4f0b-8e82-fff0810abff3",
      "name": "Drew Smirnoff",
      "email": "me@andrinoff.com",
      "service_provider": "icloud",
      "fetch_email": "me@andrinoff.com"
    },
    {
      "id": "7712fa1c-ce0b-43a9-af3a-2d69d605acf0",
      "name": "Drew Smirnoff",
      "email": "me@andrinoff.com",
      "service_provider": "icloud",
      "fetch_email": "drew@floatpane.com"
    }
  ]
}
  1. Test change:

Added keyring.MockInit to initialize a mocking memory store for testing purposes

  1. New dependency:

"github.com/zalando/go-keyring" and all the dependencies that come along.

  1. Migration:

The new changes will NOT require users to adapt to the changes.

The LoadConfig function has been changed to detect old config with the plaintext password and move it to OS keyring, deleting the plaintext detected.

  1. Size of the binary:

10.8MB --> 11.2MB

@andrinoff andrinoff marked this pull request as ready for review February 24, 2026 16:16
@andrinoff andrinoff added bug Something isn't working enhancement New feature or request labels Feb 24, 2026
@andrinoff
Copy link
Copy Markdown
Member Author

demos generate correctly, no issues found.

@andrinoff andrinoff merged commit 4728bda into floatpane:master Feb 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Password encryption,

1 participant