Comments (13)
Hi @antoniojtorres @djpate @snwfdhmp
We just released a new version of Lumber that adds a DATABASE_REJECT_UNAUTHORIZED
parameter in Lumber generated projects (it is set to false
by default to ease users onboarding). If you update Lumber to the latest version then start a new project, you should not be annoyed anymore with the SequelizeConnectionError: self-signed certificate message.
If you want to fix your actual project without re-running the install command, add this line to your .env
file:
DATABASE_REJECT_UNAUTHORIZED=false
Then edit models/index.js
(here):
- databaseOptions.dialectOptions.ssl = true;
+ if (process.env.DATABASE_REJECT_UNAUTHORIZED === false) {
+ databaseOptions.dialectOptions.ssl = { rejectUnauthorized: false };
+ } else {
+ databaseOptions.dialectOptions.ssl = true;
+ }
A quick note about the chosen implementation: I first created an implementation with a dialectOptions for Lumber, but after some discussion with other members of the team, we finally decided to implement a fix for this need only (the main argument is that we do not need to develop something heavy for problems that are not identified yet).
TL;DR: Issue fixed, update to latest Lumber version.
Thank you for your patience 🙏 Let me know if you have any issue, I would be glad to help you!
from lumber.
Hi @antoniojtorres! Thank you for your feedback and this detailed explanation 👍 . I guess we should improve this, I opened an issue on our product board about this need.
from lumber.
Thanks a lot ! You can test if this works with Heroku simply via their free Postgres add-ons
from lumber.
Hey, the fix doesn't work.
The environment variable DATABASE_REJECT_UNAUTHORIZED
doesn't automatically get parsed and converted to a boolean, so === false
doesn't work.
from lumber.
Hi, I need this too !
from lumber.
Same, I can't use DigitalOcean managed DB because of this.
from lumber.
I cannot use Heroku managed DB myself because of this.
from lumber.
@snwfdhmp & @djpate Thank you for your feedback. This concern has been reported to the product team which is aware of the issue. This is currently in our roadmap. You will be notified as soon as it has been released!
from lumber.
Related issue here: https://community.forestadmin.com/t/ssl-issues-with-forestadmin/837
(Side note: I'm working on a patch, I hope to release it this week).
from lumber.
@rap2hpoutre thanks a lot !
from lumber.
@bartjoyce Whoops. Thank you for spotting this, and sorry for the mess. A new PR is on its way!
from lumber.
@bartjoyce It has just been fixed thanks to your comment!
Could you try again with the latest version of lumber? (v3.7.2)
If you want to fix your actual project without re-running the install command, add this line to your .env
file:
DATABASE_REJECT_UNAUTHORIZED=false
Then edit models/index.js
(here):
- databaseOptions.dialectOptions.ssl = true;
+ const rejectUnauthorized = process.env.DATABASE_REJECT_UNAUTHORIZED;
+ if (rejectUnauthorized && (JSON.parse(rejectUnauthorized.toLowerCase()) === false)) {
+ databaseOptions.dialectOptions.ssl = { rejectUnauthorized: false };
+ } else {
+ databaseOptions.dialectOptions.ssl = true;
+ }
Let me know if it fixed your issue 🙏
from lumber.
Feel free to re-open if you still have any issues.
from lumber.
Related Issues (20)
- test-panel docker-compose app fails to start with a sequelize exception
- All of the feature links are broken(not found) on your github homepage HOT 1
- Lumber generate error: MongoError: value too large to reduce
- Extending rich text editor HOT 1
- There is no images inside https://docs.forestadmin.com/documentation/reference-guide/models HOT 1
- PostgreSQL, Generate a new backend application -> Error HOT 3
- DATABASE_URL hard-coded in docker-compose.yml HOT 1
- view codes does not work HOT 2
- Stuck Connection to database HOT 7
- (node:89175) UnhandledPromiseRejectionWarning: SequelizeAccessDeniedError: Access denied for user 'samplebloguser'@'localhost' (using password: YES) at ConnectionManager.connect HOT 1
- CRUD on mongoose dataBase with deepObject display "[Object, Object]" HOT 2
- Are there any plans to use typescript for Lumber, or are there any options there HOT 4
- Lumber generate fails with "Your database looks empty! Please create some collections before running the command."
- The automated release is failing 🚨
- Using GraphQL API as datasource
- Fix audit vulnerabilities for lodash and handlebars HOT 2
- Consider adding the Z SELinux label to the docker installation script
- throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn))
- Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lumber.