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 <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
Release history Release notifications | RSS feed
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.0.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for find_gcp_keys-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2e276e0d73c3c152b9623678699d1744cf89674f574ece1b2be2c4c0202a322 |
|
MD5 | e4919ffea3fbf128fc07c8154fe755cc |
|
BLAKE2b-256 | 3478821cc18cd947180d82ff77e2a419e78ee23df201db2fcf1efbbe2407e2a3 |