1

I would like to to make Odoo read the admin_passwd form a file existing on the file system.

My use case is this:
I am running an odoo:10.0 container instance on a Docker swarm-mode cluster and would like to share the necessary credentials using docker secrets.
For instance, admin_passwd would be found at /run/secrets/admin_passwd... etc.

Is this type of configuration supported in Odoo?
If not, please put some spot lights on what may help me extend Odoo and develop such a module.

Thanks in advance!

Ayman Nedjmeddine
  • 11,521
  • 1
  • 20
  • 31

1 Answers1

1

In odoo passwords are stored in pbkdf2 crypto format for security reasons. They are stored in res_users table, if you need to query directly.

You can not reverse it easily. ;)

DevendraK
  • 121
  • 1
  • 4
  • Thanks :) I kinda found that by inspecting the database and the `auth_crypt` module. Now looking if there's a *pre-start* hooks support. If not, I was thinking about making a systemd unit that executes a script before starting Odoo. The script updates the `/etc/odoo/odoo.conf` with the right credentials. This should not mess with the core behavior of Odoo ;) What do you think? – Ayman Nedjmeddine Apr 20 '17 at 07:07
  • Although Beware with the loopholes, I hope you know what you are doing. :) – DevendraK Apr 22 '17 at 07:23
  • May be you can inherit the init method of res.users, you will get the raw password before it hashes your passwords and then calling super will resume further flow. See if it works. Thank you. – DevendraK Apr 22 '17 at 07:31