Add AEAD context binding to server island encryption#16457
Conversation
🦋 Changeset detectedLatest commit: 165d38f The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
20efd59 to
1cfe677
Compare
ematipico
left a comment
There was a problem hiding this comment.
I suggest reviewing what your agent writes in the PR description, because I honestly have no idea what we're fixing based on what it wrote (very technical terms, and it assumes reviewers know the very technical details of the bug/solution).
Approving, but with an asterisk
|
@ematipico I wrote the description here. How can I write it better? It is technical, but that's necessary for a PR review. I guess I could have added a link about AAD, which is something I wasn't familiar with before starting on the change. That's here: https://en.wikipedia.org/wiki/Authenticated_encryption |
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@astrojs/check](https://github.com/withastro/astro/tree/main/packages/language-tools/astro-check) ([source](https://github.com/withastro/astro/tree/HEAD/packages/language-tools/astro-check)) | [`0.9.8` → `0.9.9`](https://renovatebot.com/diffs/npm/@astrojs%2fcheck/0.9.8/0.9.9) |  |  | | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`6.1.9` → `6.1.10`](https://renovatebot.com/diffs/npm/astro/6.1.9/6.1.10) |  |  | --- ### Release Notes <details> <summary>withastro/astro (@​astrojs/check)</summary> ### [`v0.9.9`](https://github.com/withastro/astro/blob/HEAD/packages/language-tools/astro-check/CHANGELOG.md#099) [Compare Source](https://github.com/withastro/astro/compare/@astrojs/check@0.9.8...@astrojs/check@0.9.9) ##### Patch Changes - [#​16471](withastro/astro#16471) [`f56bb3f`](withastro/astro@f56bb3f) Thanks [@​delucis](https://github.com/delucis)! - Adds support for TypeScript v6 to peer dependencies range - Updated dependencies \[[`8c62159`](withastro/astro@8c62159)]: - [@​astrojs/language-server](https://github.com/astrojs/language-server)@​2.16.7 </details> <details> <summary>withastro/astro (astro)</summary> ### [`v6.1.10`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#6110) [Compare Source](https://github.com/withastro/astro/compare/astro@6.1.9...astro@6.1.10) ##### Patch Changes - [#​16479](withastro/astro#16479) [`1058428`](withastro/astro@1058428) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes a spurious `[WARN] [content] Content config not loaded` warning during `astro dev` for projects that don't use content collections - [#​16457](withastro/astro#16457) [`3d82220`](withastro/astro@3d82220) Thanks [@​matthewp](https://github.com/matthewp)! - Hardens server island encryption to prevent encrypted data from one island component being replayed against a different one - [#​16481](withastro/astro#16481) [`152700e`](withastro/astro@152700e) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes a spurious 404 request for a dev toolbar sourcemap during `astro dev` caused by the browser mis-resolving a relative `sourceMappingURL` from the `/@​id/` URL prefix - [#​16480](withastro/astro#16480) [`1bcb43b`](withastro/astro@1bcb43b) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes an unnecessary full page reload on first navigation during dev </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuNiIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS42IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Changes
e,p,s) are now bound to their target component and purpose using AES-GCM authenticated additional data (AAD). Each ciphertext includes context likeprops:Islandorslots:CommentsSectionso that encrypted data for one component cannot be replayed against a different component, and encrypted props cannot be reused as slots.encryptStringanddecryptStringinencryption.tsaccept an optionaladditionalDatastring parameter, passed through to the Web CryptoAesGcmParams. Both the encryption side (server-islands.ts) and decryption side (endpoint.ts) now pass matching AAD values.Testing
throws when decrypting with mismatched additionalDataverifies that cross-component/cross-parameter replay is rejected at the crypto layer.Docs