-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Instance-wide params should only be injected if a connector will be using oauth #8018
Instance-wide params should only be injected if a connector will be using oauth #8018
Conversation
.withCompleteOauthServerOutputSpecification(Jsons.jsonNode(Map.of( | ||
API_CLIENT, Map.of( | ||
"type", "string", | ||
OAuthConfigSupplier.PATH_IN_CONNECTOR_CONFIG, List.of(CREDENTIALS, API_CLIENT))))))))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ConnectorSpecification
creation logic can be put into a helper method. This logic is needed in multiple places, and most of them share 90% of the parameters. Currently it is a bit hard to read, especially to tell the differences between difference test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point thanks!
...sistence/src/main/java/io/airbyte/scheduler/persistence/job_factory/OAuthConfigSupplier.java
Show resolved
Hide resolved
* Refactor OAuth consent flow with new API * Use input connector configuration in getConsentURL for OAuth flow * Instance-wide params should only be injected if a connector will be using oauth (#8018) * Add test for nested parameters
…q#7983) * Refactor OAuth consent flow with new API * Use input connector configuration in getConsentURL for OAuth flow * Instance-wide params should only be injected if a connector will be using oauth (airbytehq#8018) * Add test for nested parameters
What
Closes #5989
How
webbackend/sources/create
endpoints for oauth and merge it into thecompleteOAuth
ones in this PR, we don't need to inject masked values into connector configs anymore. Therefore, theOAuthConfigSupplier
is only used by the Scheduler at runtime to inject real OAuth credentials.OAuthConfigSupplier
injects values into the connector config by first checking oauth predicates from theOAuthConfigSpecification
object attached to the connector's spec object. It also uses it to filter unwanted property outputs before merging them in the right location as specified by the fieldpath_in_connector_config
Recommended reading order
airbyte-scheduler/persistence/src/main/java/io/airbyte/scheduler/persistence/job_factory/OAuthConfigSupplier.java