Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source-xero: enable on Cloud and disable OAuth. #42126

Open
natikgadzhi opened this issue Jul 19, 2024 · 10 comments · May be fixed by #42128 or #54127
Open

source-xero: enable on Cloud and disable OAuth. #42126

natikgadzhi opened this issue Jul 19, 2024 · 10 comments · May be fixed by #42128 or #54127

Comments

@natikgadzhi
Copy link
Contributor

Problem

Souce-Xero limits the number of OAuth users Airbyte's app can have, and we're treading water in securing a partnership.

We already have the selective authenticator in source-xero source code, but we know that on Cloud, we want to restrict new OAuth users.

We do want source-xero to be available on Cloud, though. @nataliekwong mentioned a lot of folks are running it in the Builder as a workaround.

Solution

Remove OAuth authenticator, leave the bearer authenticator only, and release a new version, with a breaking change.

@natikgadzhi
Copy link
Contributor Author

Unfortunately, Xero has custom components, so it's not as easy as opening it in the builder ;(

@btkcodedev
Copy link
Collaborator

btkcodedev commented Jul 20, 2024

Referencing PR: #42128

@natikgadzhi
Copy link
Contributor Author

@bnchrch @btkcodedev here instead of disabling OAuth we should add custom OAuth support once @bazarnov 's PR lands in Connector Builder.

We should make the source manifest-only first if it is not already.

@natikgadzhi
Copy link
Contributor Author

Hey! Now that we have OAuth support in Buidler that is coming very soon, I would love to recover source-xero OAuth support on Cloud with custom creds. Is this still needed? @bazarnov @chandlerprall @btkcodedev what should we do here, rebase the PR and change the authenticator spec to include fields and scopes? How should BTK go about it? Wait for the OAUth in Builder support?

@bazarnov
Copy link
Collaborator

It's possible definitely, having this Xero OAuthFlow as an example we had in the past, we can migrate it to the DeclarativeOAuthFlow.

The approximate spec would look like this:

{
    "oauth_connector_input_specification": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
            "consent_url": "https://login.xero.com/identity/connect/authorize?{{client_id_param}}&{{redirect_uri_param}}&response_type=code&{{scope_param}}&{{state_param}}",
            "scope": "accounting.attachments.read accounting.budgets.read accounting.contacts.read accounting.journals.read accounting.reports.read accounting.reports.tenninetynine.read accounting.settings.read accounting.transactions.read assets.read offline_access",
            "access_token_url": "https://identity.xero.com/connect/token?grant_type=authorization_code&{{auth_code_param}}&{{redirect_uri_param}}",
            "access_token_headers": {
                "Content-Type": "application/x-www-form-urlencoded",
                "Authorization": "Basic {{ {{client_id_value}}:{{client_secret_value}} | base64Encoder }}"
            },
            "extract_output": ["access_token", "refresh_token", "expires_in"]
        }
      }
}

How should BTK go about it? Wait for the OAUth in Builder support?

We can have it already if we remove the instance-wide auth credentials (owned by Airbyte earlier) from the DB, the UI will ask for the client_id and client_secret of the Customer's app. Once provided - these values are going to be used for the Authentication of the existing source we have.

The plan is next:

  • remove the instance-wide credentials for source-xero from prod db
  • update the spec with the config mentioned above for source-xero, set it under the advanced_auth, and fulfill the rest of the spec accordingly
  • release the updated source-xero

Alternatively:

  • wait until Builder has the feature enabled in the prod
  • experiment with the OAuth as much as possible and re-implement it with the above example.

@bazarnov
Copy link
Collaborator

Following the source-xero capabilities we have now, it seems like the OAuth2.0 is not that much useful, in order to be authenticated properly, since having this line should grant the access_token and refresh_token without the user's consent screen, thus - I think there is no need to have the OAuth2.0 flow here at all, if Xero gives an easier way to be authenticated using the simpler grant_type provided.

@btkcodedev
Copy link
Collaborator

Following the source-xero capabilities we have now, it seems like the OAuth2.0 is not that much useful, in order to be authenticated properly, since having this line should grant the access_token and refresh_token without the user's consent screen, thus - I think there is no need to have the OAuth2.0 flow here at all, if Xero gives an easier way to be authenticated using the simpler grant_type provided.

Ok Cool, I'll wait for the OAuth support in cloud for proceeding this.

@natikgadzhi
Copy link
Contributor Author

@topefolorunso just moved Xero to manifest-only!

@btkcodedev mind giving this over to @topefolorunso? Tope, look at the manual Baz posted above.

@natikgadzhi natikgadzhi moved this from ⏳ Waiting / Blocked to 📥 Triaging in Community Board Feb 5, 2025
@btkcodedev
Copy link
Collaborator

@topefolorunso you're up

@topefolorunso
Copy link
Collaborator

On it! @natikgadzhi. Thanks man @btkcodedev, good job so far.

@topefolorunso topefolorunso linked a pull request Feb 16, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment