-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Keychain: account manager for external systems #644
Conversation
Hey @hparfr, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
This is very dangerous IMO & I am explicitly 👎 This is enforcing bad practice and the entire keychain can be easily compromised in the UI with code similar to the following:
Given the current security, it wouldn't even require an admin to run this exploit. There is also no way to expire the existing key in the event of compromise, which is a 100% necessity with anything encryption. I'm sorry that I am not providing anything helpful to this PR, but this is because we have been toiling over this for a while & have not been able to come up with a production viable solution at this point. I would not trust my data with either this module or the PoCs we have already built for this purpose, thus the 👎 . Security is no joke, and a simple disclaimer is not enough IMO. |
Again, the aim of this module is to store credentials like smtp server, carriers, market places, magento, ftp servers and so on and don't leak them with db dumps or search_read. It's credentials you need in odoo and it's credentials which are currently stored in plain text by the modules and are easily recoverable with your snippet. With keychain module, at runtime you need to do 2 actions to decrypt a password :
From a security point of view : the current state with odoo out of the box is very terrible. With this keychain module, it's certainly not perfect but a little more secure.
Which one ?
No with keychain supported modules you will get :
With other modules, you will get :
In the event of a compromise you have to change all your passwords.
It seams your requirements (storing credit card or personal / medical data) are very different. |
Responding to comments on #622 (comment)
This module is unusable / useless if no modules consumes his services. I hope, the developer who add this module as a dependecy of his own module will read the readme. If he don't (which is plausible) we can't do anything about it.
It's a good idea to externalize the storage of sensitive data, but it may be overkill to store smtp credentials or delivery carrier accounts. |
Say no to everyone
@hparfr @lasley I won't comment about the module because I'm not a security expert. That being said, usually a good way to inject secrets in an app is via environment variables. These can be managed with tools such https://www.vaultproject.io if something more high level than editing these secrets over ssh is required. |
Add multikey feature fix tests update doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rvalyi - Ohhhhh I like that. I'm going to see about making a connector for VaultProject after I play around with it a bit more.
@hparfr - I agree on the need, but this is adding a tad bit of security and also the possibility of mass data corruption if the key needs to be revoked. The tradeoff is more dangerous than it is worth IMO.
Obviously the community can override my feelings, but they are firm on this. My project was doing nearly the exact same things you are here & I abandoned it because it is flawed from the ground up.
I recommend reading into OWASP guidelines on these subjects. They explain it all much better then me, and you will notice that nearly nothing of the guidelines is covered.
Again, I agree it isn't covered in Odoo either, but you are specifically advertising this module as a keychain
. That name implicitly states you are managing the keys in a safe fashion.
Thanks @lasley for having taking time to expose your arguments. |
@hparfr - I honestly feel real bad about blocking this & am trying to come up with a viable solution for the key management + a proposal to make this more secure. I'll update you. |
Hi @lasley, Ok there are more secure ways with external and complex system, but our all customers can't pay to have an erp (aka all in one features system) and 36 connectors with external system to maintain over the time. @hparfr proposal use a secure way, I think
It ensures all password are not clear text. It's a v9 module. If in v10 or v11 you provide a better way to do it, then we'll migrate to the new solution, but please don't break continuous improvement of the community, it's a step in the right direction https://en.wikipedia.org/wiki/Continual_improvement_process 👍 |
@bealdav - This isn't simply about security. This is also about potential data destruction with no avenue of resolve. Encryption isn't just flipping a few bits, then flipping them back with the appropriate key when needed - you also need to build a way for re-encryption of data against new keys & the revocation of old. This is standard in any application that encrypts anything, and any product without it is dangerous. Continuous improvement does not help the user of the application in the middle of a breach scenario that is faced with the decision of having to destroy all their encrypted data in order to revoke a key. Revocation is not a feature of an encryption system, it is a requirement. |
@lasley If security was the main point, you'd haven't choose odoo at all, don't you think ? @lasley Thanks for your contribution on security subjects. It's a real important for us to have expert like you on this matter, just let community go step by step to real good practice as you suggest. |
Hi, @bealdav said :
👍 on that point, too. @OCA/board , @StefanRijnhart, @Others, could you give your PoV ? kind regards. |
Fix rst in readme Rename _set_password to _inverse_set_password in models and tests Add missing new line in ir.model.access Update version number to 9.xx
👍 because this module make one step in the right direction. It brings a solution to managing credentials for external applications which not exist now in odoo. |
Thanks @elicoidal for your precise review. |
Requested changes taken in account. Thanks everyone for your comments and reviews. |
What may I do for this PR to be accepted ?
|
ping @elicoidal @lasley |
Sorry but I cannot sign off with this potential for data loss. A PSC will need to dismiss my review for merge. There's definitely enough thumbs though and it sounds like @elicoidal was onboard with the risk, so you should be good here soon. |
Can you check travis? |
Link to PR
Travis is failing on other modules when database_cleanup is included |
Revert config at its previous state.
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
* Add keychain module
Syncing from upstream OCA/server-tools (13.0)
See readme for more info