TeamPass integration for modern web browsers

Latest Version

Version
0.1.4
Update
October 9, 2019
Size
498KiB
Developer
Category
Users
49
Rating
0 ★
Manifest Version
2
Web Store Status
Languages Support
Deutsch
English
Français
Türkçe
Español
Italiano
Magyar
Polski
Português (Brasil)
Português (Portugal)
Suomi
Svenska
čeština
русский
українська
中文 (简体)
中文 (繁體)
日本語
한국어
See more
Permissions
ActiveTab
ContextMenus
ClipboardWrite
NativeMessaging
Notifications
Storage
Tabs
WebRequest
WebRequestBlocking
Https://*/*
Http://*/*
See more

TeamPass-Browser Extension

平时工作中,测试团队或运营支撑团队总会需要管理、共享大量的密码。图方便之余,就演变成了大量的11111、123456简单密码。

目前市面上的密码管理工具都是个人用的,团队间只能将完整的库文件通过WebDave的方式共享,无法满足基于角色做相关的权限控制及分层的需求。相关的SaaS平台要么不免费,要么要收费(没错,就是这么矛盾)。

虽然公司内部基于开源的TeamPass搭建了密码管理及分享平台,但是基于开源总是难用的原因,一直推广不下去。原作者提供的浏览器插件需要收费,只支持Firefox,而且万年不更新。

TeamPass支持Ldap登陆,多级文件夹管理,角色管理,角色-文件夹读写权限管理,RestAPI等功能,本身功能是很强大的,就是界面操作很反人类。所以只要写一个Chrome/Firefox插件,能够 自动填充密码,生成密码,保存新密码,更新旧密码即可。

Github上有很多Chrome的KeePass的插件,经过精挑细选,最终选定

keepassxreboot/keepassxc-browser

github.com
图标
作为模板,修改相关的功能支持TeamPass的接口即可。

TeamPass自带的RestAPI接口权限管理混乱,有用户ApiKey,有系统ApiKey,没有权限区分,可以互相查看彼此密码,跟页面管理那套接口完全不相关。代码也是相当迷人,还能正常工作,不愧是最好的语言。

首先进行RestAPI接口的修改工作,只支持用户ApiKey,只提供以下接口

/read/whoami - 列出当前用户信息
/read/mypws - 列出当前用户可见的密码
/read/myfolders - 列出当前用户可见的文件夹
/find/item - 根据url和keyword查询当前用户可见的密码
/add/item - 新增密码到指定可写文件夹
/update/item - 更新密码
接下来修改Kesspassxc-browser,支持上述的6个接口即可。
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 2, "name": "TeamPass-Browser", "version": "0.1.4", "version_name": "0.1.4", "description": "__MSG_extensionDescription__", "author": "[email protected]", "icons": { "16": "icons/teampass_16x16.png", "48": "icons/teampass_48x48.png", "64": "icons/teampass_64x64.png", "96": "icons/teampass_96x96.png", "128": "icons/teampass_128x128.png" }, "browser_action": { "default_icon": { "16": "icons/teampass_16x16.png", "18": "icons/teampass_18x18.png", "19": "icons/teampass_19x19.png", "32": "icons/teampass_32x32.png", "36": "icons/teampass_36x36.png", "38": "icons/teampass_38x38.png", "64": "icons/teampass_64x64.png" }, "default_title": "TeamPass-Browser", "default_popup": "popups/popup.html" }, "commands": { "fill_username_password": { "description": "__MSG_contextMenuFillUsernameAndPassword__", "suggested_key": { "default": "Alt+Shift+U", "mac": "MacCtrl+Shift+U" } }, "fill_password": { "description": "__MSG_contextMenuFillPassword__", "suggested_key": { "default": "Alt+Shift+I", "mac": "MacCtrl+Shift+I" } }, "fill_totp": { "description": "__MSG_contextMenuFillTOTP__", "suggested_key": { "default": "Alt+Shift+T", "mac": "MacCtrl+Shift+T" } }, "show_password_generator": { "description": "__MSG_contextMenuShowPasswordGenerator__", "suggested_key": { "default": "Alt+Shift+G", "mac": "MacCtrl+Shift+G" } } }, "options_ui": { "page": "options/options.html", "open_in_tab": true }, "background": { "scripts": [ "browser-polyfill.js", "jquery-3.3.1.min.js", "global.js", "background/nacl.min.js", "background/nacl-util.min.js", "background/teampass.js", "background/httpauth.js", "background/browserAction.js", "background/page.js", "background/event.js", "background/init.js" ] }, "content_scripts": [ { "matches": [ "" ], "exclude_matches": [ "*://*/*.xml", "*://*/*.xsd" ], "js": [ "jquery-3.3.1.min.js", "browser-polyfill.js", "content/autocomplete.js", "content/define.js", "content/teampass-browser.js", "content/pwgen.js", "content/ui.js", "global.js" ], "css": [ "css/autocomplete.css", "css/button.css", "css/define.css", "css/pwgen.css" ], "run_at": "document_idle", "all_frames": true } ], "web_accessible_resources": [ "icons/key.svg", "icons/teampass.svg", "popups/popup_remember.html" ], "permissions": [ "activeTab", "contextMenus", "clipboardWrite", "nativeMessaging", "notifications", "storage", "tabs", "webRequest", "webRequestBlocking", "https://*/*", "http://*/*" ], "default_locale": "zh_CN"}
Read more