novacode-nl / odoo-celery

Odoo & Celery integration
GNU Lesser General Public License v3.0
42 stars 44 forks source link

Hide sensitive data (password) in apply_async (argspec or kwargspec) #4

Closed bobslee closed 5 years ago

bobslee commented 5 years ago

From the Celery docs:

Sensitive information will still be accessible to anyone able to read your task message from the broker, or otherwise able intercept it.

More info and recommendation: http://docs.celeryproject.org/en/latest/userguide/tasks.html#hiding-sensitive-information-in-arguments

Code to change: Change the password to argspec or kwargspec. Keep other arguments visible though, for log/monitoring purposes.

https://github.com/novacode-nl/odoo-celery/blob/11.0/celery/models/celery_task.py#L160