ikzelf / zbxdb

Zabbix database monitoring, the easy and extendable way
GNU General Public License v3.0
94 stars 45 forks source link

implement real password encryption with symmetric keys and key rotation #68

Closed ikzelf closed 3 years ago

ikzelf commented 3 years ago

Currently a simple hash is implemented that makes it hard to see a password but easy to decode it. I see cfg files being shared with the pasword_enc in it. Better is to add cryptography, generate real keys and store them in password_env in such a way that the old form is recognised and can be converted to the new form. To do that, add a fixed prefix to the encrypted password like password_enc = "crypto:"{value} When there is just a {value} it must be the old form. When multiple keys are found in the etc/keys/ directory, encrypt against the newest key and store(when not already done) A session can run for months ..... if the database keeps running that long. The password encryption is done during the connect phase of the session.

ikzelf commented 3 years ago

Fixed

ikzelf commented 3 years ago

Fixed