Airbyte metadata ingestion fails on self-hosted instances: OAuth token URL hardcoded to /v1 instead of /api/public/v1
Affected module
Ingestion – Airbyte connector (AirbyteCloudClient, OAuth 2.0 client-credentials auth)
Describe the bug
Metadata ingestion from a self-hosted Airbyte instance using OAuth 2.0 client-credentials authentication fails at the OAuth step with:
Failed to fetch OAuth token: Expecting value: line 1 column 1 (char 0)
The workflow reports Airbyte reported errors: [0 Records, ... 1 Errors] and no connectors/pipelines are ingested.
Root cause
In ingestion/src/metadata/ingestion/source/pipeline/airbyte/client.py, AirbyteCloudClient._fetch_oauth_token() hardcodes the Applications token endpoint:
token_url = f"{clean_uri(self.config.hostPort)}/v1/applications/token"
That /v1/... path is only correct for Airbyte Cloud (api.airbyte.com/v1). On self-hosted Airbyte the public API (and the token endpoint) live under /api/public/v1. So the request hits the web application instead of the API, returns HTTP 200 with HTML, raise_for_status() passes, and response.json() fails with the 'Expecting value' error.
The same class already resolves api_version to the public path (api/v1 → api/public/v1) for every other call, but the token URL ignores it.
To Reproduce
- Add an Airbyte pipeline service pointing at a self-hosted Airbyte OSS instance (e.g.
http://<host>:8000) with OAuth 2.0 client-credentials auth (Applications client id/secret). - Run metadata ingestion.
- Ingestion fails with the OAuth token error above (0 records).
Direct confirmation of the path difference:
POST http://<host>:8000/v1/applications/token -> 200, returns HTML (web UI)
POST http://<host>:8000/api/public/v1/applications/token -> 200, returns {"access_token": ...}
Expected behavior
The OAuth token request should target the same resolved public-API path used by all other calls, so self-hosted (/api/public/v1) and Cloud (/v1) both work without the user having to distinguish them.
Version
- OpenMetadata: 1.13.x (bug also present on
main) - Airbyte: self-hosted OSS (public API / Applications OAuth)
- Deployment: Docker
Fix
PR #30421 builds the token URL from the resolved api_version and adds a regression test.