JingsongLi commented on code in PR #9089:
URL: https://github.com/apache/paimon/pull/9089#discussion_r3733746619


##########
paimon-python/pypaimon/api/token_loader.py:
##########
@@ -216,4 +260,12 @@ def create_token_loader(options: Options) -> 
Optional['DLFTokenLoader']:
             )
             role_name = options.get(CatalogOptions.DLF_TOKEN_ECS_ROLE_NAME)
             return DLFECSTokenLoader(ecs_metadata_url, role_name)
+        if loader == 'local_file':

Review Comment:
   Could we make the credential-source precedence match Java here? When 
`dlf.token-path` (or `dlf.token-loader=local_file`) is configured together with 
static `dlf.access-key-id` / `dlf.access-key-secret`, this factory returns a 
loader, but `AuthProviderFactory` also passes `DLFToken.from_options(options)` 
to `DLFAuthProvider`. Because that static token has no expiration, 
`get_token()` never calls the loader, so the token file is silently ignored. 
Java selects the loader/path before static AK/SK. Please choose a single source 
in the Python factory (for example, pass `token=None` whenever a loader exists) 
and add a mixed-configuration regression test.



-- 
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]

Reply via email to