Skip to main content

Find and report valid Google Service Account keys on your filesystem

Project description

find-gcp-keys

This tool finds and prints valid Google Service Account keys on your filesystem. This is useful for keeping track of any unexpired/non-disabled keys you may have.

It does NOT require any special permissions, or even to be authenticated with Google Cloud SDK.

Requirements

Python 3.7+

Installation

pip3 install find-gcp-keys

Usage

Command line

find-gcp-keys <dir_path> [--no-validate/-n] [--file-pattern/-p <regex>]

Note that by default, the CLI only searches for the JSON key files matching a particular pattern (<project-id>-<key-id>.json). You can override this behavior, e.g. to search for all JSON files:

find-gcp-keys <dir_path> -p '.*\.json'

Library:

from find_gcp_keys import find_key_paths, find_valid_keys, is_valid_key
...

# determine if a given file is a valid key
if is_valid_key(file_path):
  ...

# recursively search for valid keys
for file_path in find_valid_keys(dir_path):
  ...

# recursively search for possible keys, but don't validate them
for file_path in find_key_paths(dir_path):
  ...

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

find-gcp-keys-0.6.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

find_gcp_keys-0.6.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file find-gcp-keys-0.6.2.tar.gz.

File metadata

  • Download URL: find-gcp-keys-0.6.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for find-gcp-keys-0.6.2.tar.gz
Algorithm Hash digest
SHA256 71f6d55a72e9b10460ee26e54b587781859fe78c4fdcf82a85b770c34f204849
MD5 4fe62d70900145e09f2f52a3e3c79033
BLAKE2b-256 594a2bcb3979154f5ecd9e1712864b06d5abe2f2d21bbcd916a03add94d12374

See more details on using hashes here.

File details

Details for the file find_gcp_keys-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: find_gcp_keys-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for find_gcp_keys-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7adf4cc5611fbf5653d5f10d9f3cee09c1f69b417550168728e65973502358f
MD5 f4b134e6e38139a32d0f47644d8d6d21
BLAKE2b-256 ba4f98d07f94ae7b3b2a94ee8fd7ef012c99f4b272b87ed7ba01b1d8c15da852

See more details on using hashes here.

Supported by

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