Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku - mLab MongoDB Add-on Discontinued #212

Closed
alejandrosaenz117 opened this issue Sep 9, 2020 · 5 comments
Closed

Heroku - mLab MongoDB Add-on Discontinued #212

alejandrosaenz117 opened this issue Sep 9, 2020 · 5 comments

Comments

@alejandrosaenz117
Copy link

alejandrosaenz117 commented Sep 9, 2020

The mLab MongoDB Add-on will be shutting down on November 10th and may inadvertently affect the Deploy to Heroku functionality. The following documentation contains specific information.

https://docs.mlab.com/shutdown-of-heroku-add-on/

@ckarande
Copy link
Member

@Whamo12 Thanks for the information. We should migrate to MongoDB Atlas as suggested here:
https://docs.mlab.com/how-to-migrate-sandbox-heroku-addons-to-atlas/

@rcowsill
Copy link
Contributor

rcowsill commented Sep 10, 2020

Something to bear in mind is that the Atlas M0 tier doesn't support server-side javascript (from: Atlas M0 (Free Tier)... Limitations).

There's currently a $where query in allocations-dao.js, which is used to demonstrate NoSQL injection vulnerabilities:

$where: `this.userId == ${parsedUserId} && this.stocks > '${threshold}'`

EDIT: By the way, mongolab has already been removed from the addons list on the heroku dashboard. It can be added to apps using the CLI, but not the dashboard.

The NodeGoat deploy button still works, despite a spurious warning that mongolab wasn't found. Ignore the warning and mongolab gets provisioned correctly.

@rcowsill
Copy link
Contributor

rcowsill commented Sep 20, 2020

I've made a task list for the work to resolve this issue. Feedback is welcome on whether this is the right approach, or if I missed anything important.

The work to fix the "Deploy to Heroku" button can be done by any contributor (done, see PR #215):

  • Remove mongolab:sandbox addon from app.json
  • Add a MONGODB_URI env variable to app.json (required, default "")
  • Remove reference to the current mLab database from config/env/all.js
  • Remove support for MONGOLAB_URI in config/env/all.js (only needed for the mongolab addon)
  • Upgrade mongodb driver to v3.x (required to connect to Atlas M0) (Tested, works with current version)
  • Update heroku deploy instructions in README.md to cover database setup
  • Update tutorial for A1 - Injection to say NoSQL injection is blocked on deployments using Atlas M0

These tasks can only be done by members of the core project team:

I'd be happy to make a PR for the first set of tasks (if no-one's already lined up to do it).

@rcowsill
Copy link
Contributor

rcowsill commented Nov 8, 2020

Reminder: mongolab heroku addons are due to be deleted on Tuesday, November 10th. When that happens, any mLab databases still attached to a mongolab heroku addon will be deleted.

Hopefully the database for http://nodegoat.herokuapp.com/ has already been detached from its addon, otherwise the app will go down when the database gets deleted on Tuesday.

@ckarande
Copy link
Member

@rcowsill Thank you for staying on top of this and the PR. @Whamo12, appreciate your reporting this issue.

Merged the PR. I wanted to provide default Altas DB URL for a quick start for those who don't have it or willing to create an account on Atlas. Hence restored the all.js as before except with Atlas DB URL. We can revise this logic, if any suggestions.

Closing this issue.

AaronButler-Veracode pushed a commit to AaronButler-Veracode/nodegoat that referenced this issue Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants