-
Notifications
You must be signed in to change notification settings - Fork 4
Use environment variables for superuser credentials #22
Copy link
Copy link
Open
Labels
priority/medium[internal] This is not a priority right now but will be done eventually[internal] This is not a priority right now but will be done eventuallyteam/for-starters[internal] This can be done by someone external who wants to start contributing[internal] This can be done by someone external who wants to start contributingtype/featureNew feature or requestNew feature or request
Metadata
Metadata
Assignees
Labels
priority/medium[internal] This is not a priority right now but will be done eventually[internal] This is not a priority right now but will be done eventuallyteam/for-starters[internal] This can be done by someone external who wants to start contributing[internal] This can be done by someone external who wants to start contributingtype/featureNew feature or requestNew 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
.envfile.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_EMAILandALP_SUPERUSER_PASSWORDinstead ofconfig.superuserCredentials.x.ALP_SERVER_URLinstead 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.