You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when navigating between pages in the Trino-gateway UI, each page transition triggers API calls to the gateway. For every API call, a new LbPrincipal is generated by decoding the JWT and fetching the memberOf attribute from LDAP. This causes unnecessary and excessive LDAP queries on every API request, even within the same authenticated session.
Proposed improvements to reduce redundant LDAP calls:
Add an evictable cache: Maintain a cache mapping users to their memberOf attribute values, reducing repeated lookups for the same user within a reasonable TTL (time-to-live).
Include roles in JWT claims: Encode the user’s roles (e.g., memberOf information) directly into the JWT at login time. This would avoid the need for repeated LDAP calls during subsequent API requests.