osiris
osiris copied to clipboard
Allow different ApplicationConfig for different environments
There is a single instance ApplicationConfig
for all environments. This isn't sufficient for the cases where a Cognito User Pool is defined outside the Osiris application and a different user pool is used in different environments.
This is also true of VPC config - it is possible that different VPC config is required for different environments.
The API factory should take a (nullable?) argument specifying the environment name. Not sure how to make that compatible with existing projects with GeneratedApiFactory
.
The workaround for this is to define everything in the Osiris application - Cognito, VPC etc
It would be good if this could seamlessly work in the case where there are no separate environments defined.
Would that allow me set up a configuration which bypasses Authentication when running locally, but keep it secure when deployed to AWS?
Would that allow me set up a configuration which bypasses Authentication when running locally, but keep it secure when deployed to AWS?
That's what happens anyway. The local server is only intended for testing and there is no auth.
The authenticaion is done by AWS so there is actually no way to enforce auth when you're running locally.