Skip to content

refactor(authorization): rework query logic and caches to improve performance of authz lookups#1447

Merged
kkopanidis merged 1 commit intomainfrom
authorization/performance-enhancements
Mar 20, 2026
Merged

refactor(authorization): rework query logic and caches to improve performance of authz lookups#1447
kkopanidis merged 1 commit intomainfrom
authorization/performance-enhancements

Conversation

@kkopanidis
Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other (please describe)

Does this PR introduce a breaking change?

  • Yes
  • No

The PR fulfills these requirements:

  • It's submitted to the main branch
  • When resolving a specific issue, it's referenced in the PR's description (e.g. fix #xxx, where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature

Other information:

entity: { $in: candidateEntities },
});
return !!objectDefinition;
return !!matchingActorIndex;
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.

I don't know if this is an issue, but in the final case of this method why do we check if there is a matching actor index and in all the other cases we only look for object indexes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because the idea is to reverse the lookup so that we can limit results sooner. Instead of saying to which objects does the user have access, we say which objects would be of interest, and then from those, who has access?

@kkopanidis kkopanidis force-pushed the authorization/performance-enhancements branch from 96899c4 to a2540ea Compare March 20, 2026 15:01
@kkopanidis kkopanidis merged commit 73741ce into main Mar 20, 2026
3 of 5 checks passed
@kkopanidis kkopanidis deleted the authorization/performance-enhancements branch March 20, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants