aaron-y-chen commented on code in PR #77627:
URL: https://github.com/apache/airflow/pull/77627#discussion_r4729524815
##########
providers/openlineage/src/airflow/providers/openlineage/utils/spark.py:
##########
@@ -71,9 +71,9 @@ def _get_transport_information(tp) -> dict:
if hasattr(tp, "compression") and tp.compression:
properties["compression"] = str(tp.compression)
- if hasattr(tp.config.auth, "api_key") and tp.config.auth.get_bearer():
+ if hasattr(tp.config.auth, "api_key") and tp.config.auth.api_key:
Review Comment:
`hasattr(..., "api_key")` also matches `JwtTokenProvider`. This change sends
its long-lived token-exchange key to the lineage endpoint as a bearer token.
Could we restrict this to `ApiKeyTokenProvider`?
```suggestion
if isinstance(tp.config.auth, ApiKeyTokenProvider) and
tp.config.auth.api_key:
```
Please add a regression test to verify that the JWT exchange key stays out
of the Spark job config.
--
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]