-
Notifications
You must be signed in to change notification settings - Fork 6
feat(nextly): one counter every instance reads, so a revocation reaches all of them #1829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3cde076
feat(nextly): one counter every instance reads, so a revocation reach…
mobeenabdullah 6a5a9d8
fix(nextly): the epoch is a value the shared row gave, never one inve…
mobeenabdullah 49d4751
fix(nextly): publish the epoch last, and never reach for the pool fro…
mobeenabdullah 441c434
Merge remote-tracking branch 'origin/main' into feat/rbac-epoch
mobeenabdullah 7963963
fix(nextly): one answer to "is this stamp current", and no announceme…
mobeenabdullah b5d32d0
test(nextly): ask the retirement itself whether it raises, not a stan…
mobeenabdullah c27412d
Merge remote-tracking branch 'origin/main' into feat/rbac-epoch
mobeenabdullah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| "@nextlyhq/adapter-drizzle": patch | ||
| "@nextlyhq/adapter-mysql": patch | ||
| "@nextlyhq/adapter-postgres": patch | ||
| "@nextlyhq/adapter-sqlite": patch | ||
| "@nextlyhq/admin": patch | ||
| "@nextlyhq/admin-css": patch | ||
| "@nextlyhq/blocks-engine": patch | ||
| "@nextlyhq/blocks-react": patch | ||
| "@nextlyhq/builder": patch | ||
| "@nextlyhq/eslint-config": patch | ||
| "@nextlyhq/eslint-plugin": patch | ||
| "@nextlyhq/module-specifiers": patch | ||
| "@nextlyhq/plugin-form-builder": patch | ||
| "@nextlyhq/plugin-mcp": patch | ||
| "@nextlyhq/plugin-page-builder": patch | ||
| "@nextlyhq/plugin-sdk": patch | ||
| "@nextlyhq/plugin-seo": patch | ||
| "@nextlyhq/prettier-config": patch | ||
| "@nextlyhq/storage-s3": patch | ||
| "@nextlyhq/storage-uploadthing": patch | ||
| "@nextlyhq/storage-vercel-blob": patch | ||
| "@nextlyhq/telemetry": patch | ||
| "@nextlyhq/tsconfig": patch | ||
| "@nextlyhq/ui": patch | ||
| "create-nextly-app": patch | ||
| "nextly": patch | ||
| --- | ||
|
|
||
| The signal that retires a cached authorization answer is now stored in the | ||
| database, so every instance sees it. It was a counter held in memory, which | ||
| moved only in the process that handled the change: a second instance neither | ||
| saw the move nor had one of its own, and went on serving what it had cached | ||
| until the entry aged out. On the shared tier that meant a revoked grant could | ||
| outlive its revocation by the whole cache lifetime. | ||
|
|
||
| Cross-instance revocation now takes effect within about a second. Each instance | ||
| reads the shared counter at most once per second rather than once per check, so | ||
| the cost is one small indexed read per second per instance and not one per | ||
| request. The instance that MADE the change applies it immediately. | ||
|
|
||
| Two behaviour changes worth knowing about. | ||
|
|
||
| An invalidation naming one user now retires every in-memory answer rather than | ||
| that user's alone. The counter other instances read carries a number and not a | ||
| user id, so a change they can see cannot be narrower than "something in RBAC | ||
| moved", and keeping the scope locally would mean only the instance that made the | ||
| change applied it narrowly. Refilling is a couple of indexed queries and role | ||
| changes are rare; a stale answer costs a grant the install revoked. | ||
|
|
||
| A batch of permission writes no longer holds back the in-memory tiers. It never | ||
| existed to: what it saves is the unfiltered rewrite of every stored row, and | ||
| that is still deferred to the end of the batch. | ||
|
|
||
| Installations upgraded from an earlier version keep working before they | ||
| reconcile their core tables. The new table arrives through `nextly db:sync`, and | ||
| until it does, every read and write of the counter degrades to the previous | ||
| in-memory behaviour rather than failing the authorization check that asked. The | ||
| degraded state is reported once so an operator can see why cross-instance | ||
| invalidation is not yet in effect. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.