Closed youngsofun closed 1 week ago
Introduction of new constants and revamped token handling
HEADER_SESSION_ID
has been added which streamlines session identification in requests. Modified TokenType
and Credential
structures
TokenType
class has been enhanced to support conversions from numeric values to token types and to support pretty-printing. DatabendToken
variant in the Credential
structure has been revised to exclude token_type
and set_user
, and a new need_refresh
method has been introduced benefitting session refresh handling. Updates to Authentication and Session Management
HttpQueryManager
and HttpQueryContext
. refresh_in_memory_states
, has been added for session state updates which boosts session usage tracking. Improved Error and Response Handling
HttpErrorCode
allows for enhanced error handling across different modules. HttpQueryManager
, ensuring better session state management.New Handlers for Verification and Refresh
Changes in Test Suite
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
need_refresh
in session state, client do refresh only when it is true, client session id is written to meta only when there are temp tables (1. on /session/refresh 2. num of temp table changed from 0 to 1)./auth/verify
for gateway, instead of usingselect 1
need_sticky
in session state, set to true if in txn or there are temp tables, server return error if it is true but server changed/restarted.refresh_token
and for JWT session, no token is newedclient_session_id
of HTTPQuery to protect the query result.Tests
Type of change
This change isโ