You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "tlyyxjz (via GitHub)" <gi...@apache.org> on 2026/08/30 14:03:18 UTC

Re: [I] [Bug report] Intermittent authorization failure when JCasbin loaded role cache expires [gravitino]

tlyyxjz commented on issue #12169:
URL: https://github.com/apache/gravitino/issues/12169#issuecomment-5469137605

   Thanks for such a precise write-up — pinning it on the JcasbinLoadedRolesCache removal listener calling deleteRole(), which drops grouping rows (g(userId, roleId)) alongside policy rows, is the key insight. Your suggested fix — eviction should only removeFilteredPolicy(0, roleId), leaving user<->role bindings to a separate cache — is exactly right: cache eviction manages role permission policies, not role membership.
   
   This is a great real-world example of a whole failure class: a policy that is CORRECT in the data store but wrong at the enforce layer because of cache/loading state. It's the kind of drift we're building a diagnostic for (a Casbin helper tool) — watching policy/grouping consistency in the loaded enforcer against what's persisted, and flagging the gap before it shows up as an intermittent 403.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org