Page MenuHomePhabricator

Create way to store Acoustic credentials locally such that they survive rebuilds
Closed, ResolvedPublic

Description

We can store 'settings' we want included in our Civi builds in config/civicrm/settings.d/ as files like

120-acoustic.php

These hold the values we want to be 'mandatory' for various settings and that makes sense for these credentials since they are rarely changed & there is no UI to change them in the DB.

The setting in question (omnimail_credentials) is an array holding

  • Credentials shared with production - username, password,client_id,client_secret,refresh_token
  • The database_id - this is dev specific and SHOULD be checking into git - unlike the others

I put up a rough cut patch https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/dev/+/772940 - but I think the private part should probaly be stored elsewhere & I guess setup.sh needs to ensure the file exists? Or perhaps the code needs to check for it....

https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/dev/+/772940

When working correctly the code will return the combined array when the following is run

drush @wmff cvapi Setting.get return=omnimail_credentials

Details

Event Timeline

Change 772940 had a related patch set uploaded (by AndyRussG; author: Eileen):

[wikimedia/fundraising/dev@master] Add config for Acoustic credentials

https://gerrit.wikimedia.org/r/772940

Change 772940 merged by Eileen:

[wikimedia/fundraising/dev@master] Add config for Acoustic credentials

https://gerrit.wikimedia.org/r/772940