Add slack_app_signing_secret to ApplicationSettings
What does this MR do and why?
This MR adds an encrypted slack_app_signing_secret
property to ApplicationSettings
.
The signing secret allows us to verify a Slack request.
The signing secret setting will be used in !86323 (merged).
Related to #358676 (closed)
QA Steps
To QA the change to the admin application settings:
- Comment out this line so that you can see the partial on your instance.
- Visit
admin/application_settings/general
.
To QA the changes to the settings API:
POST:
curl --location --request PUT 'http://gdk.test:3000/api/v4/application/settings?private_token=<your-token>&slack_app_signing_secret=foo'
GET:
curl --location --request GET 'http://gdk.test:3000/api/v4/application/settings?private_token=<your-token>'
Migrations
Up
bundle exec rake db:migrate:up:main VERSION=20220504042847
== 20220504042847 AddSlackSigningKeyToApplicationSettings: migrating ==========
-- add_column(:application_settings, :encrypted_slack_app_signing_secret, :binary)
-> 0.0130s
-- add_column(:application_settings, :encrypted_slack_app_signing_secret_iv, :binary)
-> 0.0011s
== 20220504042847 AddSlackSigningKeyToApplicationSettings: migrated (0.0142s) =
Down
bundle exec rake db:migrate:down:main VERSION=20220504042847
== 20220504042847 AddSlackSigningKeyToApplicationSettings: reverting ==========
-- remove_column(:application_settings, :encrypted_slack_app_signing_secret_iv, :binary)
-> 0.0059s
-- remove_column(:application_settings, :encrypted_slack_app_signing_secret, :binary)
-> 0.0006s
== 20220504042847 AddSlackSigningKeyToApplicationSettings: reverted (0.0077s) =
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Luke Duncalfe