kontron / redmine_oauth

Redmine authentication through OAuth.
GNU General Public License v2.0
51 stars 25 forks source link

Encrypt client_secret #44

Closed Coolfeather2 closed 1 month ago

Coolfeather2 commented 2 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 1 month 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 1 month ago

Working, thank you for your prompt work