Skip to main content
supported python versions

supported python versions

gcreds

Inspired by credstash, I ended up putting Google Cloud Datastore and Google Cloud KMS (CLOUD KEY MANAGEMENT SERVICE) together to make gcreds to manage credentials in google cloud.

gcreds allows you store (put) and access (get) your credential in google cloud, and help to reduce security hole like keeping secrets being stored from your source code control.

Installation

Just run:

pip install gcreds

Getting started

Before you can use it, it will require a little setup work here:

  1. Greate a KMS key ring on global location, named it like gcreds.

gcloud kms keyrings create gcreds --location global
  1. Under that key ring, create a crypto key named gcreds.

gcloud kms keys create gcreds --location global --keyring gcreds --purpose encryption

You can customized location, key-ring, cryopto-key.

Once you have it setup, let’s try to put some credential.

Storing the password:

$ gcreds put mysecret SxtlB5fBvvAKT7P4
project_id is not provided, will use default project: [your-default-gcloud-project] instead.

Retriving the password:

$ gcreds get mysecret
project_id is not provided, will use default project: [your-default-gcloud-project] instead.
SxtlB5fBvvAKT7P4

You can also redirect a file to it.

Let’s have a file contain a super strong password by hand.

$ cat a_super_password.txt
Y#7U*ubwZh=D^XEq3a_MMyX3NVL_gfk9K4eq2HX

And Let’s use the redirect to enter the password

$ gcreds put mysecret < a_super_password.txt
project_id is not provided, will use default project: [your-default-gcloud-project] instead.

Let’s retrive the password

$ gcreds get mysecret
project_id is not provided, will use default project: [your-default-gcloud-project] instead.
Y#7U*ubwZh=D^XEq3a_MMyX3NVL_gfk9K4eq2HX

Metadata

Release files for gcreds 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for gcreds 0.3.0
File Interpreter ABI Platform
gcreds-0.3.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / gcreds-0.3.0-py2.py3-none-any.whl

Download URL gcreds-0.3.0-py2.py3-none-any.whl
Size 6.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2d8e546be296fd07baf346cdf81e58610e3d0ac2499bc98642d8c75c84533980
BLAKE2b-256 checksum
How to use checksums
835d403c3ed1cad179a75b3447e03fb458f33dc743a660a4621855605df2e156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file

0.2.12

1 release file

0.2.11

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page