Skip to content

Use macOS Keychain? #8

@juanjonol

Description

@juanjonol

Usually, using the Keychain is the right call. But with Unlock, I'm not convinced. Am I missing something?

What Unlock-Redux does

Unlock-Redux simply creates a JSON file and stores all the passwords (with other attributes) in it. This file is only readable and writable by root (something that is checked each time the file is used).

Pros of using the Keychain

  • A more standard location for passwords (also solves Better place for the passwords #3).
  • Maybe it makes the program simpler? (no more JSON parsing needed).
  • The passwords are encrypted at rest. This would be important to avoid them being read from a different OS (extracting the disk and reading from a different computer, for example), but the point of Unlock is to be used in a FileVault-encrypted system, which renders this point moot.
    • What's more, Unlocks uses the System Keychain, and the System Keychain's password is stored in plaintext, so it's is the same as if the System Keychain was not encrypted at all. See this comment for more info.

Cons of using the Keychain

  • Obviously, I have to spent time to implement its support.
  • Is more vulnerable? Is seems difficult that macOS has a bug that could let an attacker read a file owned by root but not let them read the keychain. However, it would be far less farfetched that macOS has a bug that could let an attacker read the keychain. In fact, this has happened recently.
  • It's looks like High Sierra has a bug that makes the keychain unusable at startup.
  • Using the System Keychain gives a false sense of security: it's easy to think that the System Keychain is encrypted and protected by a password, but essentially it's only protected by root permissions. In contrast, Unlock-Redux is clear about it's security. See this comment for more info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions