airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
14.87k stars 3.82k forks source link

[source-facebook-marketing] Unable to parse access token #40609

Open RocketerJames opened 2 weeks ago

RocketerJames commented 2 weeks ago

Connector Name

source-facebook-marketing

Connector Version

3.3.6

What step the error happened?

Updating the connector

Relevant information

Hello,

It appears that since a recent change to "Add Selectable Auth" (https://github.com/airbytehq/airbyte/pull/37625) I am no longer able to edit or create sources using the Airbyte authentication credentials (passing a secretId).

Apologies if this is more of an Airbyte Cloud/API issue than a source/connector issue.

Regards.

Relevant log output

Status:  400
  Response:
    {
      "error": {
        "message": "Invalid OAuth access token - Cannot parse access token",
        "type": "OAuthException",
        "code": 190,
        "fbtrace_id": "XXX"
      }
    })

Contribute

marcosmarxm commented 1 week ago

@RocketerJames, no need to apologize! It's a tough problem, and thanks for reporting it.

@airbytehq/critical-connectors can someone take a look or have more information about this issue?

bazarnov commented 1 week ago

@marcosmarxm I've just successfully created another source with the OAuth2.0 authentication with no issues; it seems like the Customer wants to create his source using airbyte api, which is beyond the scope of @airbytehq/dev-python, we should poke the move instead.

If there is an issue passing the creds, like it was before, the request should contain:

{
   ...,
   credentials: {
      "auth_type": "Client", # for OAuth2.0 and "Service" - for ServiceAccount authentication.
      "access_token": <token_here>,
      "client_id": <client_id_value_here>,
      "client_secret" <client_secret_value_here>,
   },
   ...
}
RocketerJames commented 1 week ago

Hi Baz,

Sorry we are using the “secretId” functionality. I am not passing my own oauth access token or secret. Since the authentication changes, the support for utilising a secret id (airbyte oauth flow) has been broken. I think this may be api/cloud related rather than the source itself as it feels this is a layer on top.

bazarnov commented 1 week ago

@RocketerJames cc

@marcosmarxm Let's check whether or not we have manual override for the client_secret, for this Customer in our DB, i think i get the issue here, and it might be not related to the airbyte api.

@tybernstein Sorry poking you here, but we have to understand ehat under the hood here in terms of how the Customer is authenticated.

@RocketerJames can you please provide the link for your connection for Airbyte Cloud?

RocketerJames commented 1 week ago

Example source that will no longer Test and Save in Airbyte Cloud: https://cloud.airbyte.com/workspaces/67d97a43-3b9f-4c06-95af-379df8a503c0/source/7668f3d0-ed63-43df-b8e3-58bb17c6e6d6

Connection utilising that source that now longer syncs: https://cloud.airbyte.com/workspaces/67d97a43-3b9f-4c06-95af-379df8a503c0/connections/fe765bca-2f9c-44e7-85d5-7fca28fdfa5f/status

Thanks @bazarnov !

bazarnov commented 1 week ago

@cmm-airbyte Please take a look; since this is related to the selective auth changes, probably, the config was not migrated correctly and thus failed to be validated with no auth_type applied to it.

wmikemoon commented 4 days ago

@cmm-airbyte @bazarnov Any update here?

bazarnov commented 9 hours ago

@wmikemoon I'll take a look as soon as possible.