Content
View differences
Updated by Hagen Mahnke 11 months ago
## Question:
Should the values for a ENV variable configuration be read-only on the UI?
If not, how do we map one specific configuration that's stored in the database to the configuration from ENV variables?
**Thoughts**
#####################################
## Considerations:
After talking with Oliver here are some further considerations:
Our SaaS environment uses multi-tenancy and the specifics need to be considered:
* for instances hosted on AWS
* we're using Postmark There used to receive emails and use a webhook from Postmark with the email content to call the MailHandler, without the need to use IMAP to get the emails (thus no need to configure it). The inbound email feature works by default.
* for instances hosted on Scaleways
* the inbound email feature currently does not work. This should be okay. And by allowing the full configuration on the UI, env vars only, later (with File storages), we can enable users had to set this up themselves and we don't need reference SSO setups. Had to worry about the multi-tenancy.
* In conclusion, we don't need create references between those two config objects. Chose to keep configurability via ENV vars for SaaS instances
Options going forward:
* migrate ENV var configuration into take env variables, create a database setting once (on upgrade)
real DB model, which was fairly easy.
* configuration via ENV var is no longer possible
* simple, after the migration
* continue reading ENV var configurations into database settings on starts (incl. upgrades)
* a value set via ENV var overwrites the setting (and makes it read-only in the UI)
* configuration via ENV is still possible
* since multiple configurations for inbound emails are possible, we'll need Please talk to identify them to map between the ENV var configuration and a database setting
* even if we still only allow one configuration via ENV var - in this case it would get a default identifier in code.
* if we want to enable multiple configurations via ENV vars, we would need to add identifiers to the ENV vars keys (for example IMAP\_\_CONFIGURATION\_ID\_\_HOST)
* See \`Saml::SeedProvider\` Wieland for an example
<br> more details.
Should the values for a ENV variable configuration be read-only on the UI?
If not, how do we map one specific configuration that's stored in the database to the configuration from ENV variables?
**Thoughts**
#####################################
## Considerations:
After talking with Oliver here are some further considerations:
Our SaaS environment uses multi-tenancy and the specifics need to be considered:
* for instances hosted on AWS
* we're using Postmark
* for instances hosted on Scaleways
* the inbound email feature currently does not work. This should be okay. And by allowing the full configuration on the UI,
* In conclusion, we don't need
Options going forward:
* migrate ENV var configuration into
* simple, after the migration
* continue reading ENV var configurations into database settings on starts (incl. upgrades)
* a value set via ENV var overwrites the setting (and makes it read-only in the UI)
* configuration via ENV is still possible
* since multiple configurations for inbound emails are possible, we'll need
* even if we still only allow one configuration via ENV var - in this case it would get a default identifier in code.
* if we want to enable multiple configurations via ENV vars, we would need to add identifiers to the ENV vars keys (for example IMAP\_\_CONFIGURATION\_ID\_\_HOST)
* See \`Saml::SeedProvider\`
<br>