GitHub App Access Token Fetcher
Utility to get access tokens for a GitHub App.
Prerequisites
- The GitHub App must be created and installed.
- A private key must be generated (from the GitHub App settings UI) and its content should be written as binary data to an AWS Secretsmanager secret.
To set up the private key, do something like this (assuming the secret is created already):
import boto3
secret_arn = "arn:aws:secretsmanager:us-east-1:1234:secret:my-secret-name"
pem_file = "/path/to/private_key.pem"
client = boto3.client('secretsmanager', region_name=secret_arn.split(':')[3])
with open(pem_file, 'rb') as f:
client.put_secret_value(SecretId=secret_arn, SecretBinary=f.read())
Install
pip install github-app-access-token-fetcher
Usage
get-github-app-token --help
usage: get-github-app-token [-h] --app-id APP_ID --private-key-secret-arn PRIVATE_KEY_SECRET_ARN
Get a GitHub App token
optional arguments:
-h, --help show this help message and exit
--app-id APP_ID GitHub App ID
--private-key-secret-arn PRIVATE_KEY_SECRET_ARN
ARN of the secret containing the GitHub App private key
Example:
export AWS_PROFILE=... # Something with access to the private key secret.
get-github-app-token \
--app-id 1234 \
--private-key-secret-arn arn:aws:secretsmanager:us-west-1:4321:secret:abc-1234
Metadata
Release files for github-app-access-token-fetcher 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| github-app-access-token-fetcher-1.0.1.tar.gz | 2.7 kB | Without provenance | Details for github-app-access-token-fetcher-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| github_app_access_token_fetcher-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for github_app_access_token_fetcher-1.0.1-py3-none-any.whl |
Total release size: 5.7 kB
Release files / github-app-access-token-fetcher-1.0.1.tar.gz
| Download URL | github-app-access-token-fetcher-1.0.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd00d670e858b9526703827af338d0ec5766c1e7069a6b23f46a7bba56d4bbea
|
|
BLAKE2b-256 checksum How to use checksums |
4e4ff76e1db367984ca9f6aaeb6f588dc225479171673966b56d598999948e26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.1 Linux/5.13.0-30-generic
|
Release files / github_app_access_token_fetcher-1.0.1-py3-none-any.whl
| Download URL | github_app_access_token_fetcher-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7281e91b2c3b350e846a9257bc6b0f7afa13ae5a55fd7d1bf57c8c4ec1fc523c
|
|
BLAKE2b-256 checksum How to use checksums |
00bfc2635ab5300f5df18d84740895b90c7633ef98479e0af5408dbdc338b6e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.1 Linux/5.13.0-30-generic
|
Security for github-app-access-token-fetcher 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.