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

Access to database manager and its URL are not configurable #5540

Closed
alejandrosantana opened this issue Mar 2, 2015 · 10 comments
Closed

Access to database manager and its URL are not configurable #5540

alejandrosantana opened this issue Mar 2, 2015 · 10 comments
Assignees
Labels

Comments

@alejandrosantana
Copy link

Access to database manager and its URL are not configurable

Impacted versions:

  • 8.0 and beyond, at least

Steps to reproduce:

  1. install Odoo
  2. load it in a browser

Current behavior:

You can access database manager via:

  • "Database manager" link at the bottom of the login page.
  • Adding "/web/database/manager" to the base Odoo url (as this is hardcoded in addons/web/controllers/main.py)

Expected behavior:

In order to improve security and avoid attacks as much as possible, it would be great to achieve these two things using the config file:

  • be able to deactivate/hide the "Database manager" link (by setting disable_database_manager in web/views/webclient_templates.xml to True)
  • modify the url to the database maager (instead hardcoded "/web/database/manager").

This can increase security, as you could hide link and choose the url and thus no one would know it, disallowing almost completely any brute-force attack to databases.

@jholze
Copy link

jholze commented Mar 2, 2015

👍

1 similar comment
@lukebranch
Copy link

+1

@xmo-odoo xmo-odoo self-assigned this Mar 3, 2015
@xmo-odoo
Copy link
Collaborator

xmo-odoo commented Mar 5, 2015

be able to deactivate/hide the "Database manager" link (by setting disable_database_manager in web/views/webclient_templates.xml to True)

The database manager must be available when there's no database, so that's not really an option.

modify the url to the database maager (instead hardcoded "/web/database/manager").

Technically already possible: create a module "dbmanager" with the __init__ file

from openerp import http
from openerp.addons.web.controllers.main import Database

class Dbtest(Database):
    @http.route('/dbmanager', type='http', auth='none')
    def manager(self, **kw):
        return super(Dbtest, self).manager(**kw)

and start the server with --load=web,dbmanager. However this won't be moving the other RPC endpoints and it won't change the link from the login page, so it's of fairly little use. You can disable them all by overriding all relevant methods without using the @route decorator though, that'll "unpublish" all the routes.

There's an internal task to disable the db manager via a command-line/configuration file flag, I could augment it with the ability to set the "root URL" for the manager (that is change the /web/database part)

And of course in production you really should have a reverse proxy in front of Odoo (if only to terminate TLS connections), you can trivially block or redirect any URL from there, or only allow them e.g. for internal IPs.

xmo-odoo added a commit to odoo-dev/odoo that referenced this issue Mar 30, 2015
* add an option ``--no-database-manager`` (and corresponding
  ``database_manager = False`` config setting) to completely disable the
  database manager:
  - disables the management URLs
  - removes UI links to these URLs
* add an option ``--database-manager = <url>`` to configure the database
  manager's url (same config file setting as above)
  - fixes up links from various templates
  - fixes up calls from JS: the database_manager client action now takes
    a ``root`` param

Odd discovery: the ``web.login_layout`` template had a test to remove
links to the database manager, but as far as I could see this wasn't
used anywhere, and the commit introducing it didn't actually make it
usable either.

task 9738
fixes odoo#5540
@alejandrosantana
Copy link
Author

@xmo-odoo I see those commits. Are they intended for odoo 8.0, for some saas or for future v9? Or just unknown?
(And is there any way I could track that?)

@reedlaw
Copy link

reedlaw commented Aug 4, 2015

I'd like to see this merged. What's blocking it?

@winston6071
Copy link

This is definitly a good idea to improve security,

mostly you using a webserver infront so what about the option of disallowing the special url except from your own VPN or Local area Network ?

Any conclusion of this approach ?

OH sorry did not see this comment @xmo-odoo

And of course in production you really should have a reverse proxy in front of Odoo (if only to >>terminate TLS connections), you can trivially block or redirect any URL from there, or only allow them >>e.g. for internal IPs.

@Yenthe666
Copy link
Collaborator

@xmo-odoo could you give an update here please? It has been a while 😉

@eabquina
Copy link

Any comments on this related to 10 or v11?

@bluemix
Copy link
Contributor

bluemix commented Sep 14, 2019

any updates about this severe issue?!

@C3POdoo
Copy link
Contributor

C3POdoo commented Mar 30, 2023

Dear @alejandrosantana,

Thank you for your report but we are closing it due to inactivity.
We apology if we could not look at your request in time.
If your report still makes sense, don't hesitate to reopen a new one. We will try to check it as soon as possible.

This is an automated message.

@C3POdoo C3POdoo closed this as completed Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants