tlyyxjz commented on issue #12169: URL: https://github.com/apache/gravitino/issues/12169#issuecomment-5469172452
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
