Skip to content

[#9898] feat(auth): Add cache support infrastructure for JcasbinAuthorizer #11032

@yuqi1129

Description

@yuqi1129

Describe the feature

Add the infrastructure needed by the follow-up JcasbinAuthorizer cache refactor.

This task includes:

  • Add a generic GravitinoCache abstraction with Caffeine and no-op implementations.
  • Add per-request lookup caches in AuthorizationRequestContext for user, group, metadata id, and owner lookup deduplication.
  • Thread AuthorizationRequestContext through authorization filter/executor paths.
  • Update isMetalakeUser to accept AuthorizationRequestContext.
  • Switch entity/owner change polling mapper APIs to id-based cursors and expose latest id lookup helpers.

Motivation

This is a smaller prerequisite task for #10996. It keeps the reusable cache/request-context support separate from the later JcasbinAuthorizer behavior rewrite, making the implementation easier to review and merge first.

Describe the solution

Introduce the support layer only. The actual JcasbinAuthorizer version-validated cache behavior will stay in a follow-up PR after this task is merged.

Additional context

Parent epic: #9898
Split from #10996.

Metadata

Metadata

Assignees

Labels

1.3.0Release v1.3.0

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions