Skip to main content

Generate Google Service Account tokens with your YubiKey

Project description

google-yubikey

Generate Google Service Account tokens with your YubiKey!

Motivation

This is perhaps the most secure way to use Google credentials outside of Google Cloud, since the private key never leaves the device, and so it cannot be leaked or stolen without physically stealing the YubiKey.

Additionally, each operation is protected with a YubiKey PIN, providing a 2nd factor of authentication as something a user knows (in addition to something a user has, which is the YubiKey itself).

In this way, a single YubiKey can represent the identity of a user across many Service Accounts, without the need to send the private key material over the wire at any point.

This makes it even more secure than Service Account impersonation, where a user's long-term refresh token has been traditionally stored on their machine, and could thus be compromised.

Requirements

YubiKey 4+

Setup

pip3 install google-yubikey

Usage

  1. Set up YubiKey PIN, as explained here.

  2. Run this only once to set up a private key on the YubiKey, or to renew it after expiration:

    google-yubikey private-key
    
  3. Run this once to register YubiKey with each Service Account:

    google-yubikey public-key -a <service_account_email>
    
  4. Run this every time you'd like to generate a Service Account token:

    google-yubikey token -a <service_account_email>
    
  5. Further customization options are available through:

    google-yubikey [<command>] -h
    

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

google-yubikey-0.1.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

google_yubikey-0.1.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file google-yubikey-0.1.2.tar.gz.

File metadata

  • Download URL: google-yubikey-0.1.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for google-yubikey-0.1.2.tar.gz
Algorithm Hash digest
SHA256 42b7a0c653f06c2e4063e2af3e373a100be70c2ce492a58bd859af7782b72280
MD5 8c4300ffaea1b7a7fc85b355e53c2510
BLAKE2b-256 bb3f956bf5f3c91bd83991bb0dfaaebbf26a52585fcd3b1e05337246318d9081

See more details on using hashes here.

File details

Details for the file google_yubikey-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: google_yubikey-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for google_yubikey-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2bebec865c5318782b51b2905c9bcfec1e4eb040b4050cc87b8cee53ad19c86c
MD5 ff7647d1252cfdf374a2fdc0f7681eef
BLAKE2b-256 b8396f63f4c3d19b3592f29e38513e4300839816f4868976dbba6a0c60b5401f

See more details on using hashes here.

Supported by

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