kaxil commented on code in PR #77733:
URL: https://github.com/apache/airflow/pull/77733#discussion_r4747840853
##########
providers/snowflake/src/airflow/providers/snowflake/utils/_rest_auth.py:
##########
@@ -149,10 +149,10 @@ def get_token(self) -> SnowflakeRestToken:
self._private_key_loaded = True
if self._private_key is None:
if conn_config.get("workload_identity_provider"):
- if (conn_config.get("authenticator") or "").upper() !=
"WORKLOAD_IDENTITY":
+ if conn_config.get("authenticator") != "workload_identity":
Review Comment:
This now relies on `_build_base_conn_config` having lower-cased the value,
but that only covers the extra: it returns `self.authenticator or
authenticator`, and `self.authenticator` is the raw constructor arg. So
`SnowflakeSqlApiOperator(authenticator="WORKLOAD_IDENTITY")` (or a hook built
with it), with `workload_identity_provider` in the extra and no private key,
works on 6.21.0 and now raises this error. Could the lower-casing apply to the
merged value instead, so the argument path gets it too? The REST-layer tests
all mock `_get_conn_params`, so a test for this would need to build the hook
against a real env connection the way
`test_get_conn_params_authenticator_from_extra` does.
--
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]