Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: config.toml and secret management #6

Open
3 tasks
WieeRd opened this issue Jan 14, 2024 · 1 comment
Open
3 tasks

feat: config.toml and secret management #6

WieeRd opened this issue Jan 14, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@WieeRd
Copy link
Owner

WieeRd commented Jan 14, 2024

Thinking-in-Progress. Everything is subject to change.

What to Include

  • Command prefix
  • Color palette for embeds
  • Initial / extra cogs
  • Bot token
  • Database login
  • API keys

Secret Management Candidates

  • Raw value
  • Environment variable
  • Run command e.g. Bitwarden CLI
  • Separate secrets.toml
    • Could use Sops in this case

Schema

prefix = ["%", ""]

[palette]
info = 0x0000FF
warn = 0x00FF00
error = 0xFF0000

[token]
env = "BOT_TOKEN"

Tasks

  • Choose secret management method
  • Design TOML schema
  • Implement config.py
@WieeRd WieeRd added the enhancement New feature or request label Jan 14, 2024
@WieeRd WieeRd added this to the ClockBot v4 milestone Jan 14, 2024
@WieeRd WieeRd self-assigned this Jan 14, 2024
@WieeRd
Copy link
Owner Author

WieeRd commented Jan 15, 2024

One way of solving internal bikeshedding is to support all 3 options.

[token]
# only one key can be specified
value = "{TOKEN}"
env = "BOT_TOKEN"
command = ["bw", "get", "notes", "ClockBot"]

I should consider:

  • Giving the environment variable a default name BOT_TOKEN
  • Removing .envrc from the repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Ready
Development

No branches or pull requests

1 participant