Ape AWS KMS: Ape plugin to make transactions through AWS KMS
Project description
Ape AWS KMS
Ape plugin to make transactions through AWS KMS
Dependencies
- python3 version 3.10 or greater, python3-dev
Installation
via pip
You can install the latest release via pip:
pip install ape-aws
via setuptools
You can clone the repository and use setuptools for the most up-to-date version:
git clone https://github.com/ApeWorX/ape-aws.git
cd ape-aws
python3 setup.py install
Quick Usage
pip install ape-aws
Using CLI tool
List commands:
ape aws -h
See logged in profile (useful for debugging auth in containers)
ape aws whoami
To create a new user (recommended for cloud usage)
ape aws users new USER
To delete this user (WARNING this is permanent)
ape aws users remove USER
Create an access key for this user (WARNING don't lose generated token)
ape aws users tokens new USER > .env.USER
To create a new Ethereum signing key (recommended to generate)
ape aws keys generate KEY
To schedule this signing key for deletion (WARNING takes 30 days)
ape aws keys remove KEY
To grant your user access to the signing key (don't forget to do this!)
ape aws keys grant KEY -u USER
IPython
First, create a KMS key with the CLI tool
ape console
In [1]: kms_signer = accounts.load("KEY")
In [2]: kms_signer.sign_message("12345")
Out[2]: <MessageSignature v=27, r=0x..., s=0x...>
Now to test your new IAM user's access, you can do the following
env $(echo .env.USER | xargs) ape console
and you should be able to do the same as the above!
Use the access token above to run with your containers by supplying them as environment variables
WARNING: Don't forget to cycle your access tokens on a regular basis to prevent access leakage!
Development
This project is in development and should be considered a beta. Things might not be in their final state and breaking changes may occur. Comments, questions, criticisms and pull requests are welcomed.
Prerequisites to AWS Setup
To begin, create a virtual environment set up and activate the virtual environment before doing anything for the setup of AWS
- You must have an AWS account
- Must be an AWS Identity and Access Management (IAM) user with administrator access
- Must have configured AWS credentials
- Must have Docker, Python3 and pip installed on your workstation
AWS Setup
For Mac and Linux
Create a ~/.aws folder in your home directory:
mkdir ~/.aws
Note: get your access key and key id from your IAM in you AWS account here.
Create a credentials file in the ~/.aws folder:
cat <<EOF > ~/.aws/credentials
[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET
EOF
Create a config file in the ~/.aws folder:
cat <<EOF > ~/.aws/config
[default]
region = YOUR_REGION
output = json
EOF
AWS KMS Key Import Steps
For manual setup, follow this article
License
This project is licensed under the Apache 2.0.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ape_aws-0.8.4.tar.gz.
File metadata
- Download URL: ape_aws-0.8.4.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a21f3fbaf790240b78ae59fd95dc74876fe39d79f7875ee35c793ce4850ec4ca
|
|
| MD5 |
75b31b2a39f2e873dc4f2f06534565a7
|
|
| BLAKE2b-256 |
32f064287a1ebbc8438d9f3865a4f480ad7d18bf6a893ae216714a9d8e25ddca
|
Provenance
The following attestation bundles were made for ape_aws-0.8.4.tar.gz:
Publisher:
publish.yaml on ApeWorX/ape-aws
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ape_aws-0.8.4.tar.gz -
Subject digest:
a21f3fbaf790240b78ae59fd95dc74876fe39d79f7875ee35c793ce4850ec4ca - Sigstore transparency entry: 211704994
- Sigstore integration time:
-
Permalink:
ApeWorX/ape-aws@2ceb3a7cb4fc6be797d6e8db5ffe70cc31d5908e -
Branch / Tag:
refs/tags/v0.8.4 - Owner: https://github.com/ApeWorX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@2ceb3a7cb4fc6be797d6e8db5ffe70cc31d5908e -
Trigger Event:
release
-
Statement type:
File details
Details for the file ape_aws-0.8.4-py3-none-any.whl.
File metadata
- Download URL: ape_aws-0.8.4-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d623daae8c1ef9f1b8c485f3b6d4f9b63d2c7aba9e996135d08608373c89093
|
|
| MD5 |
9aee071c22f3fb857f7db4100e354c66
|
|
| BLAKE2b-256 |
3817dd62d7ff33b9b7ed8b91bc80c8a63e7f234334f4983abc61f915bd298059
|
Provenance
The following attestation bundles were made for ape_aws-0.8.4-py3-none-any.whl:
Publisher:
publish.yaml on ApeWorX/ape-aws
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ape_aws-0.8.4-py3-none-any.whl -
Subject digest:
7d623daae8c1ef9f1b8c485f3b6d4f9b63d2c7aba9e996135d08608373c89093 - Sigstore transparency entry: 211705012
- Sigstore integration time:
-
Permalink:
ApeWorX/ape-aws@2ceb3a7cb4fc6be797d6e8db5ffe70cc31d5908e -
Branch / Tag:
refs/tags/v0.8.4 - Owner: https://github.com/ApeWorX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@2ceb3a7cb4fc6be797d6e8db5ffe70cc31d5908e -
Trigger Event:
release
-
Statement type: