secretId documentation unclear #48607
Replies: 2 comments
-
There seems to be longstanding confusion about how to use Airbyte in a headless form factor with the initiate oauth endpoint and subsequent source creation: I think there's a bug in the create sources endpoint that that requires the credentials object of source configuration to be provided even if there's a secretId already provided. This effectively breaks the initiate oauth via airbyte functionality completely and makes powered by airbyte way more difficult to implement. |
Beta Was this translation helpful? Give feedback.
-
@jackonawalk This is indeed confusing to users and is something we hope to have time budget in the future to clarify the UX. Currently some of the confusion is around trying to use OAuth sources with Terraform. Simply put, we don't support that flow right now. It's possible to make it work, but we have future plans on our roadmap around secret management that will hopefully help us address that and make it more tractable for users. Through the API, I'd expect you're running into this error or similar: {
"status": 422,
"type": "https://reference.airbyte.com/reference/errors#unprocessable-entity",
"title": "unprocessable-entity",
"detail": "The body of the request was not understood",
"documentationUrl": null,
"data": {
"message": "json schema validation failed when comparing the data to the json schema. \nErrors: $.credentials: must be valid to one and only one schema, but 0 are valid, $.credentials: required property 'auth_type' not found, $.credentials: required property 'auth_type' not found, $.credentials: required property 'service_account_info' not found "
}
} This happens because the auth_type is a constant and isn't something that is stored into the secret when the secret is generated, it needs to be added. Can you try sending your request with a credentials object that looks like this? { ...,
"credentials": {
"auth_type": "Client"
}
} I'll make a note to update the docs to reflect that at some points, you'll need to look at the connector specification in order to know what is or isn't handled by the OAuth secret as you'll still likely need to pass some data in with each credentials/config object. |
Beta Was this translation helpful? Give feedback.
-
I'm implementing Powered by Airbyte and using oauth for some sources. Specifically, I'm using Airbyte's oauth credentials instead of overriding and providing my own oauth credentials.
My oauth consent flow is working, and I get back a valid secret_id after the user provides consent. Documentation makes it sounds like you can pass this as the first key/value in the POST body (see screenshots below). When I do this, I get an error that the create source endpoint is expecting the credentials object in the body. Am I supposed to pass anything into the credentials object in the request body if I'm using Airbyte's oauth credentials? The documentation makes it sound like I don't need to do this since I don't need to pass my own oauth credentials. Please advise: thanks!
PS: I'm trying to create a Google Sheets source.
error: json schema validation failed when comparing the data to the json schema. \nErrors: $: required property 'credentials' not found
Beta Was this translation helpful? Give feedback.
All reactions