Skip to content

Support rotating the encryption key with core:rotate-encryption-keys - #70

Merged
snake14 merged 1 commit into
6.x-devfrom
PG-5545
Oct 1, 2026
Merged

snake14 merged 1 commit into
6.x-devfrom
PG-5545

Conversation

@snake14

@snake14 snake14 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

Lets the new core:rotate-encryption-keys console command (matomo-org/matomo#25410) replace this plugin's encryption key and re-encrypt the stored Slack OAuth token with the new key. Until now, changing encryption_key in the [Slack] config section made those values unrecoverable.

The plugin declares its encrypted values through the new CoreAdminHome.getEncryptionKeyRotationTargets event, and Encryption::withKey() lets values be encrypted and decrypted with a key other than the configured one. On a Matomo version without the command, nothing changes.

Depends on matomo-org/matomo#25410.

Issue No

PG-5545

Steps to Replicate the Issue

  1. Connect Slack so its OAuth token is stored, on a Matomo build that includes Add a console command to rotate plugin encryption keys matomo#25410.
  2. Run ./console core:rotate-encryption-keys --plugin=Slack.
  3. encryption_key in the [Slack] section of the config file has changed, and sending a Slack report or alert still works.

Checklist

  • [✔] Tested locally or on demo2/demo3?
  • [✔] New test case added/updated?
  • [NA] Are all newly added texts included via translation?
  • [NA] Are text sanitized properly? (Eg use of v-text v/s v-html for vue)
  • [✔] Version bumped?
  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules
  • [NA] Documentation updated?

@snake14
snake14 marked this pull request as ready for review September 30, 2026 21:55
@snake14
snake14 requested a review from a team September 30, 2026 21:55
@snake14 snake14 added the Needs Review For pull requests that need a code review. label Sep 30, 2026

@lachiebol lachiebol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, works well locally

@snake14
snake14 merged commit a00e5dd into 6.x-dev Oct 1, 2026
46 of 47 checks passed
@snake14
snake14 deleted the PG-5545 branch October 1, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review For pull requests that need a code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants