Skip to main content

A python library to update credentials for a connection in TablePlus macOS client without using GUI

Project description

tableplus-macos-update-creds

A python library to update credentials for a connection in TablePlus macOS client without using GUI

TablePlus is a neat SQL GUI client. As virtually any decent SQL client it allows juggling multiple connections, storing the credentials in a secure manner. However, updating a lot of ephemeral credentials via GUI may be quite annoying even though importing connections is supported.

This library's main goal is to allow updating credentials programmatically, without using GUI.

Please note that this project is not affiliated with TablePlus and all the techniques have been developed through (poor) reverse engineering. The library has only been tested against TablePlus 4.2.0 (build 388) on macOS 13.1 with python 3.7/3.8/3.9/3.10. The techniques employed may stop working if any of these happens:

  • TablePlus changes its connections config format
  • TablePlus changes keychain account name format used for storing connection passwords
  • macOS changes ACL mechanics
  • codesign output format changes

Example

The following code may be used as a shell script

#!/usr/bin/env python3

from argparse import ArgumentParser
import sys

from tableplus_macos_update_creds import update_creds


def main():
    parser = ArgumentParser()
    parser.add_argument('--connection', dest='connection')
    parser.add_argument('--username', dest='username')
    parser.add_argument('--password', dest='password')
    args = parser.parse_args(sys.argv[1:])

    update_creds(args.connection, username=args.username, password=args.password)


if __name__ == '__main__':
    main()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tableplus_macos_update_creds-0.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file tableplus_macos_update_creds-0.0.1.tar.gz.

File metadata

File hashes

Hashes for tableplus_macos_update_creds-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d37973f49e2be1d1bc1bd469cd1bb4ea06705be2f19bf09dc65a7316dd741084
MD5 712e9097fdf207aee902b998879e2bc1
BLAKE2b-256 70e81fde6cf412a6d0548a301d892bb3fb80c29e3393a20cf33b3607280a74e3

See more details on using hashes here.

File details

Details for the file tableplus_macos_update_creds-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tableplus_macos_update_creds-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd0254e0948ce085ddfb95f1e80a9da4cc2a6da9177c481c5e870f0ccd19fac0
MD5 058feee2d7169d1548c1c8a788289738
BLAKE2b-256 08df7f6056dd13a8f709a88b583da66e8a3758287facb4a9cd63e559f4ee20bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page