Closed rap2hpoutre closed 4 years ago
feat: add dialectOptions to allow users to choose their connection options My understanding is that you'll have to consider this option after a first onboarding failure.
If I am right, after a first onboarding failure, will developers have to:
lumber --help
dialectOptions
is the solution to their issuedialectOptions
refers to Sequelize connection optionlumber generate
command
?If I am right
@arnaudbesnier Fortunately, you are wrong 🎉
👉 BONUS: Do you want to be my reviewer? 🥰 (I failed to find one!)
See:
⚠️ Issue
I see one big issue with this implementation. Users could miss that a
dialectOptions
option has been configured since it is only referenced inmodels/index.js
. For instance, if they selectedpostgreSQL
during their onboarding (see specs), it will automatically add the line above in their code, and they could forget to remove it when going to production, which is a security issue since they are not protected about man in the middle attack:Reviewer, before testing and reading code, could you help me decide how to address this issue?
Solution 1
Adding a comment such as:
Caveat: User can still miss this comment (but Forest Admin has done its job: users may be aware thanks to this comment).
Solution 2
Move
dialectOptions
JSON string in.env
.Then in
models/index.js
Caveat: writing JSON in
.env
is not that common I guess.Pull Request checklist: