Skip to main content

A telegram bot to generate OTPs

Project description

License: MIT PyPI version Gitlab pipeline status Python code style

Yet Another OTP Bot

A Telegram Bot to generate OTPs.

@yaotpbot

Architecture

Architecture of bot

Software

Yaotpbot is written in Python and use telegram-bot-api to interact with Telegram.

Infrastructure

A DynamoDB table it's used to store the identifiers of the chats and all the related seeds, needed to generate OTPs. All those information are stored encrypted and just decrpyted at runtime, using dynamodb-encryption-sdk library with AES encryption.

Deployment

CI/CD is automated with GitOps. in particular:

  • The pipeline
  • The operator deploys and keep synced the manifests created on a local k3s cluster.

Installation and usage

The bot can either be used as a container (registry) or installed directly with pip running

pip3 install --upgrade yaotpbot 

Note that following environment variables must be set:

Name Description
TELEGRAM_API_TOKEN Telegram Api Token of your bot needed to interact with Telegram. You always get a new one when creating a new bot.
DYNAMO_DB_ENDPOINT A custom DynamoDB endpoint when not using AWS. By default the bot looks for a table called yaotpbot-table using the credentials provided.
DYNAMO_AES_SIGN_KEY Key used to sign encrypted data stored on DynamoDB. Can be generated running python scrips/keys.py
DYNAMO_AES_ENCRYPTION_KEY Key used to encrypt data stored on DynamoDB. Can be generated running python scrips/keys.py
AWS_ACCESS_KEY_ID AWS access key id. Used with AWS_SECRET_ACCESS_KEY to interact with DynamoDB.
AWS_SECRET_ACCESS_KEY AWS secret access key. Used with AWS_ACCESS_KEY_ID to interact with DynamoDB.

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

yaotpbot-0.0.7.tar.gz (52.2 kB view details)

Uploaded Source

Built Distribution

yaotpbot-0.0.7-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file yaotpbot-0.0.7.tar.gz.

File metadata

  • Download URL: yaotpbot-0.0.7.tar.gz
  • Upload date:
  • Size: 52.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for yaotpbot-0.0.7.tar.gz
Algorithm Hash digest
SHA256 d71f3c9ddef4559aa6288e341bd1538f45d5cde0345e65063ea6f77d09a20bb6
MD5 45581c54b64d4ea06e93b93d452a5546
BLAKE2b-256 59417cfb9d79b2562b60aa55c5e6e070f042454ebe5b5a887e3ea51584c8dd87

See more details on using hashes here.

File details

Details for the file yaotpbot-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: yaotpbot-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for yaotpbot-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1cc1d76cfb489f61a0ac6f191121805ca6ad5e74666f3d623e5ec3469bb1f508
MD5 739c88c7312ed5a060b11f739d730a61
BLAKE2b-256 00d4f35a4b98768d5a5b2a0ae5b25cdf366d7d607bfc5c68098201cd754556a0

See more details on using hashes here.

Supported by

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