rahul-madaan opened a new pull request, #77627: URL: https://github.com/apache/airflow/pull/77627
closes: #77625 When OpenLineage transport info is injected into a Spark job and the HTTP transport uses `api_key` auth, `spark.openlineage.transport.auth.apiKey` was set to the client's `get_bearer()` value, `"Bearer <key>"`. The OpenLineage Spark integration's `ApiKeyTokenProvider` adds `Bearer ` itself, so Spark sent `Authorization: Bearer Bearer <key>`. Any backend that checks the key rejected every Spark event with 401. This change injects the key as configured. It applies to every operator that injects transport info: SparkSubmit, Livy, Dataproc, Databricks, EMR Serverless and Glue. It also applies when the key comes from an Airflow connection (`airflow_connection_api_key`), because that is resolved into the same `api_key` config. The tests in the openlineage, apache-spark, apache-livy and google providers expected `"Bearer <key>"` and now expect the raw key. I checked this end to end with `airflow dags test` and a `SparkSubmitOperator` (Spark 4.3.0, `openlineage-spark` 1.55.0), sending events to a local endpoint that only accepts `Authorization: Bearer secret_123`: | | Key in transport config | Key from Airflow connection | |---|---|---| | `main` | 6/6 Spark events rejected (401), header `Bearer Bearer secret_123` | 6/6 rejected (401), same header | | this PR | 6/6 accepted (201), header `Bearer secret_123` | 6/6 accepted (201), same header | The Airflow task events were accepted in all four runs. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code (Claude Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
