Skip to content

GoldenPassport 0.2.0

Choose a tag to compare

@thatscode thatscode released this 19 Nov 16:31

Download GoldenPassport-0.2.0.zip, unzip it and follow INSTALL.md (中文:安装说明.md). Signed with a Developer ID and notarized by Apple. Requires macOS 13 or later; runs natively on Apple Silicon and on Intel.

Caution

The installer backs up your current app and data to ~/GoldenPassport-backups/, unencrypted. Delete it with cleanup.sh once you no longer need to roll back, and never share it.

A ground-up rewrite for current macOS and a drop-in upgrade for 0.1.x: same app, same bundle id, and your existing accounts are migrated automatically. The changes below are relative to 0.1.7, the last release of the original project. To upgrade, run install.sh from the release package; see Installation.

New features

  • New app icon in the macOS 26 style (a gold key with a person in its bow, after the original icon), with a matching menu bar icon that stays sharp at every size. macOS 13–15 show a flat version of it.
  • Codes follow the TOTP settings in the otpauth URL: algorithm (SHA1, SHA256, SHA512), digits (6–8) and period. 0.1.x ignored them and always generated 6-digit SHA1 codes every 30 seconds, so accounts with other settings got wrong codes.
  • English interface: 0.1.x menus were in Chinese only. The interface follows the system language, or pick one in the menu under Language / 语言.
  • Manage window (⌘M): drag or use the arrow buttons to reorder, double-click to rename, right-click to edit the URL or delete (#12, #17, #29).
  • Configurable global hotkeys: ⌃⌥⌘0–9 (new default), ⇧⌘0–9 (as in 0.1.x), ⌃⌥0–9, or off. Registered system-wide, so the keystroke no longer also reaches the frontmost app (#4, #11, #18).
  • Export as an otpauth URL list (.txt) that other authenticator apps can import; import accepts both this format and .secrets backups (#10, #30).
  • Launch at login toggle.
  • Update check: Check for Updates… asks GitHub whether a newer release is out, and Check for Updates Daily does so once a day (off by default). If a release changes the data format or needs an intermediate upgrade first, the prompt says so before you install anything.
  • The account name is suggested from the otpauth URL label, and pasted URLs are trimmed (#26).
  • Installer with a safety net: install.sh backs up the app and data, checks every migrated account and restores the previous app and data automatically if a check fails. rollback.sh puts back the previous app, and cleanup.sh deletes the unencrypted leftovers once you no longer need to roll back. Their messages follow the app's language.
  • Rolling back is a round trip: accounts you add or change in 0.1.x after rolling back are listed when you upgrade again, and you choose which ones to import.

Fixes

  • Crashes when adding an account or reading a QR code image (#1, #16, #21, #22, #25, #28).
  • ⌘V / ⌘C / ⌘A now work in text fields (#9).
  • The HTTP index page declares UTF-8, so Chinese account names display correctly (#26).
  • Duplicate names are rejected instead of silently overwriting an existing account.
  • Deleting an account asks for confirmation.
  • The menu bar icon is visible to menu bar managers such as Bartender.

Security & privacy

  • Releases are signed with a Developer ID and notarized by Apple: they open without Gatekeeper workarounds, and updates from the same developer keep their access to your accounts in the Keychain without asking again.
  • Signed releases keep your accounts in the login Keychain instead of a plaintext file. Other apps can't read them without macOS asking you first, and copies of the data folder (installer backups, sync tools, unencrypted Time Machine backups) no longer carry your secrets. Builds you make yourself are ad-hoc signed, and macOS would ask for Keychain access after every update of such a build, so they keep using accounts.json unless built with KEYCHAIN=1.
  • The HTTP API is off on new installs. It has no password, so while it runs anything running as you on this Mac can read every code. Upgrades from 0.1.x keep their previous setting.
  • GoldenPassport goes online only to check for updates, and only when you ask it to: choose Check for Updates…, or turn on Check for Updates Daily (off by default). The check asks GitHub's API for the latest release and, if it is newer, downloads that release's small compat.json. Requests identify themselves only as GoldenPassport/<version> and carry no cookies or account information. Nothing is downloaded or installed automatically.
  • The HTTP API listens on 127.0.0.1 only and rejects requests with a foreign Host header (#6), so web pages cannot read your codes through DNS rebinding.
  • Data files are owner-only: the data directory is 0700 and files are 0600. 0.1.x left them readable by every local user; 0.2.0 tightens the existing files without changing them.
  • Both export formats warn that the file contains every secret unencrypted.
  • See Data & security for every place a copy of your secrets can exist.

Behaviour changes to be aware of

0.1.x 0.2.0
Minimum macOS 10.10 13
Default hotkeys ⇧⌘0–9 (3/4/5 clash with screenshots) ⌃⌥⌘0–9; ⇧⌘ is still available in the menu
Typing the code into the frontmost app Accessibility permission Still needs it, and it must be granted again after upgrading
HTTP API at launch On unless you turned it off Off on new installs; upgrades keep the 0.1.x setting
Where accounts are stored gp.secrets The login Keychain in signed releases, accounts.json in builds you make yourself. Migrated automatically on first launch; gp.secrets is kept but no longer updated
Account order Changed randomly between launches Alphabetical after migration, then whatever order you set

简体中文

下载 GoldenPassport-0.2.0.zip,解压后按 安装说明.md 操作。使用 Developer ID 签名并经过 Apple 公证,需要 macOS 13 或更高版本,原生支持 Apple 芯片,也支持 Intel。

[!CAUTION]
安装脚本会把当前的 App 和数据备份到 ~/GoldenPassport-backups/,备份没有加密。确认不再需要回退后,请用 cleanup.sh 删除,也不要把它发给任何人。

针对新版 macOS 从头重写,0.1.x 的用户可以直接覆盖升级:还是同一个 App、同一个 Bundle ID,已有的账号会自动迁移。以下对比的是原项目的最后一个版本 0.1.7。升级时请运行发布包里的 install.sh,见安装。

新功能

  • 新图标:按 macOS 26 的风格重画(金色钥匙,钥匙圈里是一个人像,延续原来的图标),菜单栏图标也随之更新,在各种尺寸下都清晰。macOS 13–15 显示它的扁平版本。
  • 验证码按 otpauth URL 里的 TOTP 参数生成:algorithm(SHA1、SHA256、SHA512)、digits(6–8 位)和 period。0.1.x 会忽略这些参数,一律生成 30 秒一换的 6 位 SHA1 验证码,参数不同的账号拿到的验证码是错的。
  • 英文界面:0.1.x 的菜单只有中文。新版默认跟随系统语言,也可以在菜单「语言 / Language」里固定为简体中文或英文。
  • 管理窗口(⌘M):拖动或用上下箭头调整顺序,双击重命名,右键修改 URL 或删除(#12、#17、#29)。
  • 全局快捷键可配置:⌃⌥⌘0–9(新的默认值)、⇧⌘0–9(0.1.x 的方式)、⌃⌥0–9,或者关闭。改为系统级注册,按键不会再同时传给当前 App(#4、#11、#18)。
  • 导出 otpauth URL 列表(.txt),可以导入其他验证器 App。导入同时支持这种格式和 .secrets 备份文件(#10、#30)。
  • 开机自动启动开关。
  • 检查更新:「检查更新…」向 GitHub 查询有没有新版本,「每天自动检查更新」每天查询一次(默认关闭)。如果新版本会改变数据格式,或者需要先升级到某个中间版本,提示里会在安装前写明。
  • 添加账号时,会根据 otpauth URL 里的标签自动填写标识;粘贴的 URL 会自动去掉首尾空白(#26)。
  • 带保护的安装脚本:install.sh 会先备份 App 和数据,迁移后逐条核对账号,核对不通过就自动恢复到安装前的 App 和数据。rollback.sh 恢复安装前的 App,cleanup.sh 在不再需要回退时删除未加密的残留文件。脚本的提示语言和 App 的界面语言一致。
  • 回退之后还能再升级回来:回退期间在 0.1.x 里新增或修改的账号,再次升级时会列出来,由你选择要导入哪些。

问题修复

  • 添加账号或识别二维码图片时闪退(#1、#16、#21、#22、#25、#28)。
  • 输入框里可以正常使用 ⌘V / ⌘C / ⌘A 了(#9)。
  • HTTP 页面声明了 UTF-8 编码,中文账号名不再乱码(#26)。
  • 重名时会提示,不再静默覆盖已有账号。
  • 删除账号前会先确认。
  • Bartender 等菜单栏管理工具可以识别 GoldenPassport 的图标了。

安全与隐私

  • 正式版使用 Developer ID 签名并经过 Apple 公证:下载后可以直接打开,不用绕过 Gatekeeper;同一个开发者签名的后续更新可以直接读取钥匙串里的账号,不会再次询问。
  • 签名的正式版把账号存在登录钥匙串里,不再写明文文件。别的程序要读取时,系统会先弹框问你;数据目录被拷走、被同步工具带走,或出现在安装备份、未加密的时间机器备份里,都不会再带出密钥。自己构建的版本是 ad-hoc 签名,每次更新后系统都会重新询问钥匙串授权,所以默认仍用 accounts.json,除非构建时加上 KEYCHAIN=1。
  • 全新安装时 HTTP 接口默认关闭。它没有访问密码,开启期间,这台 Mac 上以你的身份运行的任何程序都能读取全部验证码。从 0.1.x 升级的用户保持原来的设置。
  • GoldenPassport 只在检查更新时联网,而且只在你要求时才检查:点「检查更新…」,或者打开「每天自动检查更新」(默认关闭)。检查时会向 GitHub 的接口查询最新版本;如果比当前版本新,还会下载这个版本附带的 compat.json 小文件。请求只以 GoldenPassport/<版本号> 标识自己,不带 Cookie,也不带任何账号信息。不会自动下载或安装新版本。
  • HTTP 接口只监听 127.0.0.1,并拒绝 Host 头不是本机的请求(#6),网页无法通过 DNS 重绑定读取你的验证码。
  • 数据文件仅本人可读:数据目录权限为 0700,文件为 0600。0.1.x 的文件本机所有用户都能读,0.2.0 会收紧已有文件的权限,但不改动文件内容。
  • 两种导出格式在导出前都会提示:文件里是未加密的全部密钥。
  • 密钥副本可能存在的所有位置,见数据与安全。

需要注意的行为变化

0.1.x 0.2.0
最低系统版本 10.10 13
默认快捷键 ⇧⌘0–9(3/4/5 和系统截图冲突) ⌃⌥⌘0–9;仍可在菜单里切换回 ⇧⌘
自动填入验证码 需要辅助功能权限 仍然需要,而且升级后要重新授权
启动时开启 HTTP 接口 默认开启,可以手动关闭 全新安装默认关闭;升级的用户保持 0.1.x 里的设置
账号存放位置 gp.secrets 签名的正式版存在登录钥匙串里,自己构建的版本存在 accounts.json 里。首次启动时自动迁移;gp.secrets 会保留,但之后不再更新
账号顺序 每次启动都可能变化 迁移后按名称排序,之后按你调整的顺序