Use environment variables for superuser credentials #22
Labels
priority/medium
[internal] This is not a priority right now but will be done eventually
team/for-starters
[internal] This can be done by someone external who wants to start contributing
type/feature
New feature or request
Use case
To improve security and flexibility, we should avoid hardcoding superuser credentials into the Astro config that is committed to repositories. Instead, it would be better to use credentials provided via a
.env
file.Currently, you can already achieve this by importing credentials from Astro's environment variable API and passing them into the loader (as described in #17).
To simplify this process, we could define some environment variables globally instead of requiring them to be passed to each loader instance.
Advantages
Requirements
ALP_SUPERUSER_EMAIL
andALP_SUPERUSER_PASSWORD
instead ofconfig.superuserCredentials.x
.ALP_SERVER_URL
instead ofconfig.url
.Not sure about the naming of these yet.
This change can be non-breaking if we keep the current configuration options as a fallback when no environment variables are defined.
Bonus:
If possible, make the environment variables used by the loader type-safe.
The text was updated successfully, but these errors were encountered: