kontron / redmine_oauth

Redmine authentication through OAuth.
GNU General Public License v2.0
61 stars 27 forks source link

Encrypt client_secret #44

Closed Coolfeather2 closed 4 months ago

Coolfeather2 commented 4 months ago

Hi

Is it possible to encrypt the client_secret in the plugin setting page and database (using Redmine::Configuration['database_cipher_key'])?

Redmine has this functionality within AuthSource, Repository and User Class, but does not look like its available for Settings Class

Ref: https://www.rubydoc.info/github/redmine/redmine/Redmine/Ciphering

picman commented 4 months ago

Implemented as follows. As soon as you set the database_cipher_key in config/configuration.yml, the client_secret is ciphered when you save the plugin's options and deciphered when you read them. Could you test it with the devel branch, please?

Coolfeather2 commented 4 months ago

Working, thank you for your prompt work