Skip to content

PhoenixKit 2.11.0: A dedicated key and key rotation for integration secrets

PhoenixKit 2.11.0 gives stored integration credentials an encryption key of their own, with a task to rotate it, and fixes several sitemap gaps on sites with a domain per language.

Integration credentials get their own key

API keys and tokens saved in the Integrations module were encrypted with a key derived from secret_key_base, the same secret that signs sessions and CSRF tokens. Anyone who could read it could decrypt every credential. Credentials can now use a dedicated key:

config :phoenix_kit,
  integrations_encryption_key: System.get_env("PHOENIX_KIT_INTEGRATIONS_ENCRYPTION_KEY")

mix phoenix_kit.integrations.rotate_key moves every stored credential to a new key. It first decrypts all of them, then re-encrypts them in one transaction, so either all rotate or none do. Credentials still in plain text from before encryption get encrypted on the way. The task prints the new secret and the config to set; it writes no file, so you set the key yourself and restart. --dry-run checks every row without changing anything.

While no dedicated key is set, the Integrations settings page shows a warning, Credentials are protected only by a shared application secret, that names the task to run.

Sitemap fixes

  • On a site with a domain per language, a language without a domain of its own lost all its URLs from the sitemap. Those URLs now go into the primary domain’s sitemap with their language prefix.
  • Routes in the :api and :phoenix_kit_api pipelines are now left out of discovered routes wherever they are mounted, not only under /api.
  • Sitemap.regenerate/1 now regenerates the sitemap; it returned a “not implemented” placeholder.

Media annotations

On a labelled shape in the media viewer, Reply silently did nothing. It works again. The annotation tooltip no longer covers a shape’s label, with the Etcher script moving to 0.13.1.

Upgrading

No migration. Update the dependency. To stop using the shared key, run mix phoenix_kit.integrations.rotate_key, set integrations_encryption_key from the printed secret, and restart. Keep that secret: without it the stored credentials cannot be read.

Full release notes: PhoenixKit 2.11.0

2.11.0 · 17 August 2026

Sitemap round-out (domainless-language URLs, a real regenerate/1, JSON-pipeline route exclusion), independent integrations encryption keys with rotation, and a media-annotation comment fix, with etcher bumped to 0.13.1 (#725, #726, #727, #728, #729).

Added

  • Integrations encryption key rotation. mix phoenix_kit.integrations.rotate_key re-encrypts (or, for a still-plaintext row from before this release, encrypts for the first time) every stored integration credential under the currently configured key, and the encryption key can now be decoupled from secret_key_base via a dedicated config, with an admin-UI warning when a host is still relying on the legacy shared-key fallback (#728).
  • sitemap_router_discovery now excludes JSON-pipeline routes, not just ^/api-path routes — a route piped through :api or :phoenix_kit_api is recognized as non-page regardless of where it’s mounted (a module’s own API prefix, or a host’s infrastructure endpoint like Caddy’s on-demand-TLS ask hook) (#727).

Fixed

  • Domain-mode sitemap dropped every URL for a language with no domain of its own. Domainless languages now fall back into the primary domain’s file with their locale-prefixed path intact, computed the same way as a mapped language’s alternates (#725).
  • Sitemap.regenerate/1 returned a “not implemented” placeholder instead of actually regenerating the sitemap; wired to the same Generator call the sitemap controller already uses (#726).
  • Master comment on a labelled annotation shape repeated the shape’s label as the comment body, even though the sidebar already renders the label as the thread’s heading — post-merge review found the described fallback for older phoenix_kit_comments releases didn’t actually work (the new allow_empty_content flag doesn’t exist in any released version, so the bodiless-content attempt always failed and Reply silently did nothing for every labelled shape); fixed by retrying with the label as content on that specific failure, so the flow works today and upgrades transparently once phoenix_kit_comments ships real support for the flag (#729).
  • etcher bumped to 0.13.1 — the annotation tooltip anchored above the shape element, which for a labelled shape is exactly where the label floats, covering it; the anchor box is now the shape unioned with its label and badge (#729).

PhoenixKit 2.11.0. Install or update: {:phoenix_kit, "~> 2.11"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.