Skip to content
New issue

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

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

Already on GitHub? # to your account

Add option to crash autorestic when key is missing instead of generating a new key #383

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

dotboris
Copy link
Contributor

@dotboris dotboris commented Jul 3, 2024

Relates to #202

This PR adds the requireKey field to the backend config.

Normally, when autorestic check finds a backend without a key, it will generate a new key and update the config to add this key. This option prevents this behavior. When requireKey: true is set on a backend and no key is found, autorestic will crash instead of generating a key and updating the config.

This should help accidental problems from misconfiguration when managing auotrestic through configuration management tools.

dotboris added 2 commits July 2, 2024 20:25
This option will prevent `autorestic` from generating a key and will
cause it to crash instead. This is intended for use cases where you want
to provision the key yourself and don't want `autorestic` to
accidentally generate one for you.
Copy link

vercel bot commented Jul 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
autorestic ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 0:45am

@cupcakearmy
Copy link
Owner

thanks for this! nice PR :)

@cupcakearmy cupcakearmy merged commit bc74d3f into cupcakearmy:master Aug 28, 2024
2 checks passed
@dotboris dotboris deleted the require-key-config branch August 28, 2024 17:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants