Jonathan Sider
05/29/2024, 11:23 AMkapa.ai
05/29/2024, 11:23 AMAuthorization
header with a token, you can use the following format: yaml authenticator: type: ApiKeyAuthenticator header: "Authorization" api_token: "Token {{ config['api_key'] }}"
3. Example Configuration: - Here is an example configuration for adding a custom header in the YAML format: yaml authenticator: type: ApiKeyAuthenticator header: "Authorization" api_token: "Token {{ config['api_key'] }}"
4. Testing Values: - You can set the actual API key or token via "Testing values" in the connector builder and by the end user when configuring this connector as a Source. For more detailed information, you can refer to the [authentication concept page](https://docs.airbyte.com/connector-development/connector-builder-ui/authentication). If you encounter any issues or if the UI does not support a specific feature, you might need to manually edit the YAML configuration or check the [Connector Builder UI documentation](https://docs.airbyte.com/connector-development/connector-builder-ui/authentication#authentication-methods) for more details. If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 11:28 AMkapa.ai
05/29/2024, 11:28 AMkapa.ai
05/29/2024, 11:28 AMfoo1
with value foo2
when using the OAuthAuthenticator
, you need to define these headers in the RequestOptionsProvider
. The OAuthAuthenticator
itself handles the OAuth-specific headers, but you can add additional headers using the RequestOptionsProvider
. Here’s how you can do it: 1. Define the OAuthAuthenticator: - First, set up the OAuthAuthenticator
with the required parameters. 2. Add Custom Headers: - Use the RequestOptionsProvider
to add custom headers. Here is an example configuration: yaml authenticator: type: "OAuthAuthenticator" token_refresh_endpoint: "<https://api.example.com/oauth/token>" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_token: "{{ config['refresh_token'] }}" access_token_name: "access_token" expires_in_name: "expires_in" request_options_provider: request_parameters: headers: foo1: "foo2"
### Example Configuration yaml authenticator: type: "OAuthAuthenticator" token_refresh_endpoint: "<https://api.example.com/oauth/token>" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_token: "{{ config['refresh_token'] }}" access_token_name: "access_token" expires_in_name: "expires_in" request_options_provider: request_parameters: headers: foo1: "foo2"
### Explanation - OAuthAuthenticator: This section configures the OAuth authentication with the necessary parameters like token_refresh_endpoint
, client_id
, client_secret
, and refresh_token
. - RequestOptionsProvider: This section allows you to add custom headers. In this example, it adds a header foo1
with the value foo2
. For more details, you can refer to the [Request Options documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/request-options#authenticators). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 11:39 AMkapa.ai
05/29/2024, 11:39 AMkapa.ai
05/29/2024, 11:39 AMOAuthAuthenticator
configuration, but the YAML configuration is not being accepted as expected. Based on the provided knowledge sources, it appears that the OAuthAuthenticator
does not directly support adding custom headers through the request_options_provider
in the YAML configuration. However, you can achieve this by extending the OAuthAuthenticator
to include custom headers. Here’s how you can do it: ### Step-by-Step Guide 1. Define the OAuthAuthenticator: - Set up the OAuthAuthenticator
with the required parameters. 2. Add Custom Headers: - Unfortunately, the current OAuthAuthenticator
does not support adding custom headers directly in the YAML configuration. You might need to extend the functionality in the code. ### Example Configuration Here is the basic configuration for `OAuthAuthenticator`: yaml authenticator: type: "OAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {}
### Custom Implementation If you need to add custom headers, you might need to implement a custom authenticator by extending the OAuthAuthenticator
class in your code. Here’s a conceptual example: python from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class CustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['foo1'] = 'foo2' return headers
### YAML Configuration for Custom Authenticator Once you have implemented the custom authenticator, you can reference it in your YAML configuration: yaml authenticator: type: "CustomOAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {}
### Documentation Links For more details on how to implement custom authenticators, you can refer to the following documentation: - [OAuthAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth) - [CustomAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/CustomAuthenticator) If you need further assistance or if there are any specific issues you are encountering, feel free to ask!Jonathan Sider
05/29/2024, 11:43 AMkapa.ai
05/29/2024, 11:43 AMkapa.ai
05/29/2024, 11:44 AMcustom_authenticator.py
. python # custom_authenticator.py from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class CustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['foo1'] = 'foo2' return headers
2. Modify the Dockerfile: - Ensure your Dockerfile copies the custom authenticator file into the Docker image. dockerfile # Dockerfile FROM airbyte/python-connector-base:1.1.0 COPY . /airbyte/integration_code RUN pip install /airbyte/integration_code # The entrypoint and default env vars are already set in the base image # ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" # ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
3. Update the Connector Configuration: - Reference your custom authenticator in the connector's YAML configuration. Ensure the custom authenticator is imported and used correctly. yaml # connector_config.yaml authenticator: type: "CustomOAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {{}}
4. Build and Run the Docker Image: - Build the Docker image with your custom authenticator. sh docker build . -t airbyte/source-custom-connector:dev
- Run the Docker container. sh docker run -it --rm airbyte/source-custom-connector:dev
### Summary - Custom Authenticator Class: Create a Python file (custom_authenticator.py
) with your custom authenticator class. - Dockerfile: Ensure the Dockerfile copies the custom authenticator file into the Docker image. - Connector Configuration: Reference the custom authenticator in the connector's YAML configuration. - Build and Run: Build and run the Docker image with your custom authenticator. For more details, you can refer to the [OAuthAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth) and [CustomAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/CustomAuthenticator). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 12:09 PMkapa.ai
05/29/2024, 12:09 PMkapa.ai
05/29/2024, 12:10 PMrun-ab-platform.sh
script to set up your Airbyte instance and you don't have a custom Dockerfile, you can still add your custom Python code to the Airbyte workspace. Here’s how you can do it: ### Step-by-Step Guide 1. Locate the Airbyte Workspace: - The airbyte_workspace
volume is where you can place your custom connector code. This volume is mounted to the Airbyte containers, making it accessible. 2. Create the Custom Authenticator Class: - Create a new Python file for your custom authenticator. For example, you can name it custom_authenticator.py
. python # custom_authenticator.py from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class CustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['foo1'] = 'foo2' return headers
3. Place the Python File in the Airbyte Workspace: - Copy the custom_authenticator.py
file into the airbyte_workspace
directory. You can do this using Docker commands or by directly accessing the volume if you have it mounted on your host machine. sh # Example command to copy the file into the Docker volume docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
4. Update the Connector Configuration: - Reference your custom authenticator in the connector's YAML configuration. Ensure the custom authenticator is imported and used correctly. yaml # connector_config.yaml authenticator: type: "CustomOAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {{}}
5. Restart Airbyte Services: - Restart the Airbyte services to ensure that the new code is loaded. sh # Restart Airbyte services docker-compose restart
### Summary - Custom Authenticator Class: Create a Python file (custom_authenticator.py
) with your custom authenticator class. - Place in Airbyte Workspace: Copy the Python file into the airbyte_workspace
directory. - Connector Configuration: Reference the custom authenticator in the connector's YAML configuration. - Restart Services: Restart the Airbyte services to load the new code. For more details, you can refer to the [OAuthAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth) and [CustomAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/CustomAuthenticator). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 12:17 PMpython
# custom_authenticator.py
from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator
class CustomOAuthAuthenticator(OAuthAuthenticator):
def __init__(self, *args, *kwargs):
super().__init__(*args, *kwargs)
def get_auth_header(self):
headers = super().get_auth_header()
headers['foo1'] = 'foo2'
return headers
kapa.ai
05/29/2024, 12:17 PMkapa.ai
05/29/2024, 12:17 PMget_auth_header
method to include all the headers you need. Here’s how you can do it: ### Custom Authenticator with Multiple Headers python # custom_authenticator.py from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class CustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['foo1'] = 'foo2' headers['foo3'] = 'foo4' headers['foo5'] = 'foo6' return headers
### Explanation - CustomOAuthAuthenticator: This class extends the OAuthAuthenticator
to include custom headers. - get_auth_header: This method calls the parent class's get_auth_header
method to get the default headers and then adds the custom headers (foo1
, foo3
, and foo5
). ### Steps to Implement 1. Create the Custom Authenticator Class: - Save the above code in a file named custom_authenticator.py
. 2. Place the Python File in the Airbyte Workspace: - Copy the custom_authenticator.py
file into the airbyte_workspace
directory. sh # Example command to copy the file into the Docker volume docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
3. Update the Connector Configuration: - Reference your custom authenticator in the connector's YAML configuration. yaml # connector_config.yaml authenticator: type: "CustomOAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {{}}
4. Restart Airbyte Services: - Restart the Airbyte services to ensure that the new code is loaded. sh # Restart Airbyte services docker-compose restart
### Summary - Custom Authenticator Class: Create a Python file (custom_authenticator.py
) with your custom authenticator class. - Place in Airbyte Workspace: Copy the Python file into the airbyte_workspace
directory. - Connector Configuration: Reference the custom authenticator in the connector's YAML configuration. - Restart Services: Restart the Airbyte services to load the new code. For more details, you can refer to the [OAuthAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth) and [CustomAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/CustomAuthenticator). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 1:28 PMTraceback (most recent call last):
File "/home/airbyte/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/manifest_declarative_source.py", line 194, in _validate_source
validate(self._source_config, declarative_component_schema)
File "/home/airbyte/.pyenv/versions/3.9.11/lib/python3.9/site-packages/jsonschema/validators.py", line 934, in validate
raise error
jsonschema.exceptions.ValidationError: 'WMCustomOAuthAuthenticator' is not one of ['ApiKeyAuthenticator']
Failed validating 'enum' in schema[0]['properties']['type']:
{'enum': ['ApiKeyAuthenticator'], 'type': 'string'}
On instance['type']:
'WMCustomOAuthAuthenticator'
kapa.ai
05/29/2024, 1:28 PMkapa.ai
05/29/2024, 1:28 PMyaml authenticator: type: "CustomAuthenticator" class_name: "custom_authenticator.CustomOAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {{}}
### Explanation - type: Set to "CustomAuthenticator"
to indicate that a custom authenticator is being used. - class_name: Provide the fully qualified name of the custom authenticator class, including the module path (e.g., custom_authenticator.CustomOAuthAuthenticator
). ### Summary - Custom Authenticator Class: Ensure the custom authenticator class is correctly implemented and placed in the airbyte_workspace
. - YAML Configuration: Update the YAML configuration to use the CustomAuthenticator
type and provide the fully qualified class name. - Restart Services: Restart the Airbyte services to load the new configuration. For more details, you can refer to the [CustomAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/CustomAuthenticator). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 1:46 PMkapa.ai
05/29/2024, 1:46 PMkapa.ai
05/29/2024, 1:47 PMWMCustomOAuthAuthenticator
is not recognized by the schema validator. To resolve this, you need to use the CustomAuthenticator
type in the YAML configuration and provide the fully qualified class name. ### Correct YAML Configuration Here’s how you can update your YAML configuration to reference the custom authenticator: yaml authenticator: type: "CustomAuthenticator" class_name: "custom_authenticator.WMCustomOAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {}
### Custom Authenticator Python Code Ensure your custom authenticator class is correctly implemented and placed in the `airbyte_workspace`: python # custom_authenticator.py from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class WMCustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['WM_SVC.NAME'] = 'XXXXXXXX' headers['Accept'] = 'application/json' headers['WM_QOS.CORRELATION_ID'] = 'XXXX_AB' headers['WM_CONSUMER.CHANNEL.TYPE'] = 'Seller' return headers
### Steps to Implement 1. Create the Custom Authenticator Class: - Save the above Python code in a file named custom_authenticator.py
. 2. Place the Python File in the Airbyte Workspace: - Copy the custom_authenticator.py
file into the airbyte_workspace
directory. sh # Example command to copy the file into the Docker volume docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
3. Update the Connector Configuration: - Use the CustomAuthenticator
type and provide the fully qualified class name in the YAML configuration. 4. Restart Airbyte Services: - Restart the Airbyte services to ensure that the new code is loaded. sh # Restart Airbyte services docker-compose restart
### Summary - Custom Authenticator Class: Ensure the custom authenticator class is correctly implemented and placed in the airbyte_workspace
. - YAML Configuration: Update the YAML configuration to use the CustomAuthenticator
type and provide the fully qualified class name. - Restart Services: Restart the Airbyte services to load the new configuration. For more details, you can refer to the [CustomAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/CustomAuthenticator). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 2:27 PMTraceback (most recent call last):
File "/home/airbyte/.pyenv/versions/3.9.11/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/manifest_declarative_source.py", line 194, in _validate_source
validate(self._source_config, declarative_component_schema)
File "/home/airbyte/.pyenv/versions/3.9.11/lib/python3.9/site-packages/jsonschema/validators.py", line 934, in validate
raise error
jsonschema.exceptions.ValidationError: 'WMCustomOAuthAuthenticator' is not one of ['ApiKeyAuthenticator']
Failed validating 'enum' in schema[0]['properties']['type']:
{'enum': ['ApiKeyAuthenticator'], 'type': 'string'}
On instance['type']:
'WMCustomOAuthAuthenticator'
kapa.ai
05/29/2024, 2:28 PMkapa.ai
05/29/2024, 2:28 PMCustomAuthenticator
type is not directly supported in the YAML configuration for the Airbyte Connector Builder. The error message indicates that the type WMCustomOAuthAuthenticator
is not recognized by the schema validator. ### Workaround Since the CustomAuthenticator
type is not supported directly in the YAML configuration, you will need to use a supported authenticator type and then modify the code to include your custom headers. ### Using OAuthAuthenticator with Custom Headers You can extend the OAuthAuthenticator
and add your custom headers in the Python code. Here’s how you can do it: 1. Create the Custom Authenticator Class: - Save the following Python code in a file named `custom_authenticator.py`: python # custom_authenticator.py from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class WMCustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['WM_SVC.NAME'] = 'XXXXXXXX' headers['Accept'] = 'application/json' headers['WM_QOS.CORRELATION_ID'] = 'XXXX_AB' headers['WM_CONSUMER.CHANNEL.TYPE'] = 'Seller' return headers
2. Place the Python File in the Airbyte Workspace: - Copy the custom_authenticator.py
file into the airbyte_workspace
directory. sh # Example command to copy the file into the Docker volume docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
3. Update the Connector Configuration: - Use the OAuthAuthenticator
type in the YAML configuration and ensure the custom authenticator is correctly referenced in the code. yaml authenticator: type: "OAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {{}}
4. Restart Airbyte Services: - Restart the Airbyte services to ensure that the new code is loaded. sh # Restart Airbyte services docker-compose restart
### Summary - Custom Authenticator Class: Create a Python file (custom_authenticator.py
) with your custom authenticator class. - Place in Airbyte Workspace: Copy the Python file into the airbyte_workspace
directory. - YAML Configuration: Use the OAuthAuthenticator
type in the YAML configuration. - Restart Services: Restart the Airbyte services to load the new code. For more details, you can refer to the [OAuthAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 2:32 PMkapa.ai
05/29/2024, 2:32 PMkapa.ai
05/29/2024, 2:33 PMCustomAuthenticator
type is not directly supported in the YAML configuration, you need to ensure that your custom authenticator is properly integrated into the Airbyte codebase. Here’s a more detailed step-by-step guide to achieve this: ### Step-by-Step Guide 1. Create the Custom Authenticator Class: - Save the following Python code in a file named `custom_authenticator.py`: python # custom_authenticator.py from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class WMCustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['WM_SVC.NAME'] = 'XXXXXXXX' headers['Accept'] = 'application/json' headers['WM_QOS.CORRELATION_ID'] = 'XXXX_AB' headers['WM_CONSUMER.CHANNEL.TYPE'] = 'Seller' return headers
2. Place the Python File in the Airbyte Workspace: - Copy the custom_authenticator.py
file into the airbyte_workspace
directory. This directory is typically mounted to the Airbyte containers, making it accessible. sh # Example command to copy the file into the Docker volume docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
3. Update the Connector Configuration: - Use the CustomAuthenticator
type in the YAML configuration and provide the fully qualified class name. yaml authenticator: type: "CustomAuthenticator" class_name: "custom_authenticator.WMCustomOAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {{}}
4. Ensure the Custom Authenticator is Recognized: - Make sure that the custom authenticator is correctly referenced in the Airbyte codebase. This might involve modifying the Airbyte source code to include your custom authenticator. 5. Restart Airbyte Services: - Restart the Airbyte services to ensure that the new code is loaded. sh # Restart Airbyte services docker-compose restart
### Summary - Custom Authenticator Class: Create a Python file (custom_authenticator.py
) with your custom authenticator class. - Place in Airbyte Workspace: Copy the Python file into the airbyte_workspace
directory. - YAML Configuration: Use the CustomAuthenticator
type in the YAML configuration and provide the fully qualified class name. - Restart Services: Restart the Airbyte services to load the new code. For more details, you can refer to the [CustomAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/CustomAuthenticator). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 2:59 PMkapa.ai
05/29/2024, 2:59 PMkapa.ai
05/29/2024, 2:59 PMRequestOptionsProvider
to add custom headers to your requests. Here’s how you can do it in the YAML configuration: ### Using RequestOptionsProvider
to Add Custom Headers You can define custom headers using the RequestOptionsProvider
in your YAML configuration. Here’s an example of how to add custom headers to the OAuth request: yaml authenticator: type: "OAuthAuthenticator" token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" grant_type: "client_credentials" client_id: "{{ config['client_id'] }}" client_secret: "{{ config['client_secret'] }}" refresh_request_body: {{}} request_options_provider: request_parameters: headers: WM_SVC.NAME: "XXXXXXXX" Accept: "application/json" WM_QOS.CORRELATION_ID: "XXXX_AB" WM_CONSUMER.CHANNEL.TYPE: "Seller"
### Explanation - OAuthAuthenticator: This section configures the OAuth authentication with the necessary parameters like token_refresh_endpoint
, client_id
, client_secret
, and grant_type
. - RequestOptionsProvider: This section allows you to add custom headers. In this example, it adds headers WM_SVC.NAME
, Accept
, WM_QOS.CORRELATION_ID
, and WM_CONSUMER.CHANNEL.TYPE
. ### Summary - Define OAuthAuthenticator: Set up the OAuthAuthenticator
with the required parameters. - Add Custom Headers: Use the RequestOptionsProvider
to add custom headers to the request. For more details, you can refer to the [Request Options documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/request-options#request-options-1). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 3:13 PMkapa.ai
05/29/2024, 3:13 PMkapa.ai
05/29/2024, 3:13 PMrequest_options_provider
is not being accepted in the YAML configuration within the Connection Builder UI. Based on the provided knowledge sources, the request_options_provider
should be a valid way to add custom headers, but if the UI is erasing it, it might not be supported directly in the Connection Builder UI. ### Alternative Approach Since the request_options_provider
is not working as expected in the Connection Builder UI, you can try adding the headers directly within the HttpRequester
configuration. Here’s how you can do it: ### Example Configuration yaml base_requester: type: HttpRequester url_base: "<https://developer.api.stg.walmart.com/>" http_method: "GET" authenticator: type: OAuthAuthenticator client_id: '{{ config["client_id"] }}' grant_type: client_credentials client_secret: '{{ config["client_secret"] }}' refresh_request_body: {} token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>" request_options_provider: request_headers: WM_SVC.NAME: "XXXXXXXX" Accept: "application/json" WM_QOS.CORRELATION_ID: "XXXX_AB" WM_CONSUMER.CHANNEL.TYPE: "Seller"
### Explanation - HttpRequester: This section configures the HTTP requester with the base URL and HTTP method. - OAuthAuthenticator: This section configures the OAuth authentication with the necessary parameters like token_refresh_endpoint
, client_id
, client_secret
, and grant_type
. - request_options_provider: This section allows you to add custom headers directly within the HttpRequester
configuration. ### Summary - Define HttpRequester: Set up the HttpRequester
with the base URL and HTTP method. - Add OAuthAuthenticator: Configure the OAuth authentication with the required parameters. - Add Custom Headers: Use the request_options_provider
to add custom headers directly within the HttpRequester
configuration. For more details, you can refer to the [Request Options documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/request-options#request-options-1). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 3:18 PMkapa.ai
05/29/2024, 3:18 PMkapa.ai
05/29/2024, 3:18 PMrequest_options_provider
and custom headers are not being accepted in the Connection Builder UI. Given the constraints, let's try a different approach by ensuring that the custom headers are added directly within the OAuthAuthenticator
class in your Python code. ### Custom Authenticator with Custom Headers 1. Create the Custom Authenticator Class: - Save the following Python code in a file named `custom_authenticator.py`: python # custom_authenticator.py from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class WMCustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['WM_SVC.NAME'] = 'XXXXXXXX' headers['Accept'] = 'application/json' headers['WM_QOS.CORRELATION_ID'] = 'XXXX_AB' headers['WM_CONSUMER.CHANNEL.TYPE'] = 'Seller' return headers
2. Place the Python File in the Airbyte Workspace: - Copy the custom_authenticator.py
file into the airbyte_workspace
directory. This directory is typically mounted to the Airbyte containers, making it accessible. sh # Example command to copy the file into the Docker volume docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
3. Update the Connector Configuration: - Use the OAuthAuthenticator
type in the YAML configuration and ensure the custom authenticator is correctly referenced in the code. yaml base_requester: type: HttpRequester url_base: "<https://developer.api.stg.walmart.com/>" http_method: "GET" authenticator: type: "OAuthAuthenticator" class_name: "custom_authenticator.WMCustomOAuthAuthenticator" client_id: '{{ config["client_id"] }}' grant_type: "client_credentials" client_secret: '{{ config["client_secret"] }}' refresh_request_body: {{}} token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>"
4. Restart Airbyte Services: - Restart the Airbyte services to ensure that the new code is loaded. sh # Restart Airbyte services docker-compose restart
### Summary - Custom Authenticator Class: Create a Python file (custom_authenticator.py
) with your custom authenticator class. - Place in Airbyte Workspace: Copy the Python file into the airbyte_workspace
directory. - YAML Configuration: Use the OAuthAuthenticator
type in the YAML configuration and reference the custom authenticator class. - Restart Services: Restart the Airbyte services to load the new code. For more details, you can refer to the [OAuthAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 3:20 PMkapa.ai
05/29/2024, 3:20 PMkapa.ai
05/29/2024, 3:20 PMpython
# custom_authenticator.py
from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator
class WMCustomOAuthAuthenticator(OAuthAuthenticator):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_auth_header(self):
headers = super().get_auth_header()
headers['WM_SVC.NAME'] = 'XXXXXXXX'
headers['Accept'] = 'application/json'
headers['WM_QOS.CORRELATION_ID'] = 'XXXX_AB'
headers['WM_CONSUMER.CHANNEL.TYPE'] = 'Seller'
return headers
2. Place the Python File in the Airbyte Workspace:
- Copy the custom_authenticator.py
file into the airbyte_workspace
directory. This directory is typically mounted to the Airbyte containers, making it accessible.
sh
# Example command to copy the file into the Docker volume
docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
3. Update the Connector Configuration:
- Use the OAuthAuthenticator
type in the YAML configuration and ensure the custom authenticator is correctly referenced in the code.
yaml
base_requester:
type: HttpRequester
url_base: "<https://developer.api.stg.walmart.com/>"
http_method: "GET"
authenticator:
type: "OAuthAuthenticator"
class_name: "custom_authenticator.WMCustomOAuthAuthenticator"
client_id: '{{ config["client_id"] }}'
grant_type: "client_credentials"
client_secret: '{{ config["client_secret"] }}'
refresh_request_body: {{}}
token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>"
4. Ensure Python Path Includes Custom Module:
- Make sure that the Python path includes the directory where custom_authenticator.py
is located. You can do this by setting the PYTHONPATH
environment variable.
sh
# Set the PYTHONPATH to include the directory with custom_authenticator.py
export PYTHONPATH=$PYTHONPATH:/path/to/airbyte_workspace
5. Restart Airbyte Services:
- Restart the Airbyte services to ensure that the new code is loaded.
sh
# Restart Airbyte services
docker-compose restart
### Summarykapa.ai
05/29/2024, 3:20 PMpython # custom_authenticator.py from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class WMCustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['WM_SVC.NAME'] = 'XXXXXXXX' headers['Accept'] = 'application/json' headers['WM_QOS.CORRELATION_ID'] = 'XXXX_AB' headers['WM_CONSUMER.CHANNEL.TYPE'] = 'Seller' return headers
2. Place the Python File in the Airbyte Workspace: - Copy the custom_authenticator.py
file into the airbyte_workspace
directory. This directory is typically mounted to the Airbyte containers, making it accessible. sh # Example command to copy the file into the Docker volume docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
3. Update the Connector Configuration: - Use the OAuthAuthenticator
type in the YAML configuration and ensure the custom authenticator is correctly referenced in the code. yaml base_requester: type: HttpRequester url_base: "<https://developer.api.stg.walmart.com/>" http_method: "GET" authenticator: type: "OAuthAuthenticator" class_name: "custom_authenticator.WMCustomOAuthAuthenticator" client_id: '{{ config["client_id"] }}' grant_type: "client_credentials" client_secret: '{{ config["client_secret"] }}' refresh_request_body: {{}} token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>"
4. Ensure Python Path Includes Custom Module: - Make sure that the Python path includes the directory where custom_authenticator.py
is located. You can do this by setting the PYTHONPATH
environment variable. sh # Set the PYTHONPATH to include the directory with custom_authenticator.py export PYTHONPATH=$PYTHONPATH:/path/to/airbyte_workspace
5. Restart Airbyte Services: - Restart the Airbyte services to ensure that the new code is loaded. sh # Restart Airbyte services docker-compose restart
### Summary - Custom Authenticator Class: Create a Python file (custom_authenticator.py
) with your custom authenticator class. - Place in Airbyte Workspace: Copy the Python file into the airbyte_workspace
directory. - YAML Configuration: Use the OAuthAuthenticator
type in the YAML configuration and reference the custom authenticator class. - Set PYTHONPATH: Ensure the PYTHONPATH
includes the directory with custom_authenticator.py
. - Restart Services: Restart the Airbyte services to load the new code. For more details, you can refer to the [OAuthAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 3:24 PMkapa.ai
05/29/2024, 3:24 PMkapa.ai
05/29/2024, 3:24 PMPYTHONPATH
in the airbyte-server
container.
### Steps to Set PYTHONPATH in Docker Compose
1. Locate the Docker Compose File:
- Find your docker-compose.yaml
file used to set up Airbyte.
2. Modify the Docker Compose File:
- Add the PYTHONPATH
environment variable to the airbyte-server
service configuration.
Here’s an example of how to modify the docker-compose.yaml
file:
yaml
version: '3'
services:
airbyte-server:
image: airbyte/server:${VERSION}
container_name: airbyte-server
restart: unless-stopped
environment:
- AIRBYTE_ROLE=${AIRBYTE_ROLE:-}
- AIRBYTE_VERSION=${VERSION}
- CONFIG_DATABASE_PASSWORD=${CONFIG_DATABASE_PASSWORD:-}
- CONFIG_DATABASE_URL=${CONFIG_DATABASE_URL:-}
- CONFIG_DATABASE_USER=${CONFIG_DATABASE_USER:-}
- CONFIGS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION=${CONFIGS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION:-}
- CONFIG_ROOT=${CONFIG_ROOT}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
- DATABASE_URL=${DATABASE_URL}
- DATABASE_USER=${DATABASE_USER}
- JOB_MAIN_CONTAINER_CPU_LIMIT=${JOB_MAIN_CONTAINER_CPU_LIMIT}
- JOB_MAIN_CONTAINER_CPU_REQUEST=${JOB_MAIN_CONTAINER_CPU_REQUEST}
- JOB_MAIN_CONTAINER_MEMORY_LIMIT=${JOB_MAIN_CONTAINER_MEMORY_LIMIT}
- JOB_MAIN_CONTAINER_MEMORY_REQUEST=${JOB_MAIN_CONTAINER_MEMORY_REQUEST}
- JOBS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION=${JOBS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION:-}
- LOG_LEVEL=${LOG_LEVEL}
- NEW_SCHEDULER=${NEW_SCHEDULER}
- SECRET_PERSISTENCE=${SECRET_PERSISTENCE}
- TEMPORAL_HOST=${TEMPORAL_HOST}
- TRACKING_STRATEGY=${TRACKING_STRATEGY}
- JOB_ERROR_REPORTING_STRATEGY=${JOB_ERROR_REPORTING_STRATEGY}
- JOB_ERROR_REPORTING_SENTRY_DSN=${JOB_ERROR_REPORTING_SENTRY_DSN}
- WEBAPP_URL=${WEBAPP_URL}
- WORKER_ENVIRONMENT=${WORKER_ENVIRONMENT}
- WORKSPACE_ROOT=${WORKSPACE_ROOT}
- PYTHONPATH=/path/to/airbyte_workspace # Add this line
ports:
- "8001:8001"
volumes:
- workspace:${WORKSPACE_ROOT}
- data:${CONFIG_ROOT}
3. Restart Airbyte Services:
- Restart the Airbyte services to apply the changes.
sh
# Restart Airbyte services
docker-compose down
docker-compose up -d
### Summary
- Locate Docker Compose File: Find your docker-compose.yaml
file.
- Modify Docker Compose File: Add the PYTHONPATH
environment variable to the airbyte-server
service configuration.
- Restart Services: Restart the Airbyte services to apply the changes.
By setting the PYTHONPATH
in the airbyte-server
container, you ensure that the custom Python module is accessible, allowing your custom authenticator to be recognized.kapa.ai
05/29/2024, 3:24 PMPYTHONPATH
in the airbyte-server
container. ### Steps to Set PYTHONPATH in Docker Compose 1. Locate the Docker Compose File: - Find your docker-compose.yaml
file used to set up Airbyte. 2. Modify the Docker Compose File: - Add the PYTHONPATH
environment variable to the airbyte-server
service configuration. Here’s an example of how to modify the docker-compose.yaml
file: yaml version: '3' services: airbyte-server: image: airbyte/server:${VERSION} container_name: airbyte-server restart: unless-stopped environment: - AIRBYTE_ROLE=${AIRBYTE_ROLE:-} - AIRBYTE_VERSION=${VERSION} - CONFIG_DATABASE_PASSWORD=${CONFIG_DATABASE_PASSWORD:-} - CONFIG_DATABASE_URL=${CONFIG_DATABASE_URL:-} - CONFIG_DATABASE_USER=${CONFIG_DATABASE_USER:-} - CONFIGS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION=${CONFIGS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION:-} - CONFIG_ROOT=${CONFIG_ROOT} - DATABASE_PASSWORD=${DATABASE_PASSWORD} - DATABASE_URL=${DATABASE_URL} - DATABASE_USER=${DATABASE_USER} - JOB_MAIN_CONTAINER_CPU_LIMIT=${JOB_MAIN_CONTAINER_CPU_LIMIT} - JOB_MAIN_CONTAINER_CPU_REQUEST=${JOB_MAIN_CONTAINER_CPU_REQUEST} - JOB_MAIN_CONTAINER_MEMORY_LIMIT=${JOB_MAIN_CONTAINER_MEMORY_LIMIT} - JOB_MAIN_CONTAINER_MEMORY_REQUEST=${JOB_MAIN_CONTAINER_MEMORY_REQUEST} - JOBS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION=${JOBS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION:-} - LOG_LEVEL=${LOG_LEVEL} - NEW_SCHEDULER=${NEW_SCHEDULER} - SECRET_PERSISTENCE=${SECRET_PERSISTENCE} - TEMPORAL_HOST=${TEMPORAL_HOST} - TRACKING_STRATEGY=${TRACKING_STRATEGY} - JOB_ERROR_REPORTING_STRATEGY=${JOB_ERROR_REPORTING_STRATEGY} - JOB_ERROR_REPORTING_SENTRY_DSN=${JOB_ERROR_REPORTING_SENTRY_DSN} - WEBAPP_URL=${WEBAPP_URL} - WORKER_ENVIRONMENT=${WORKER_ENVIRONMENT} - WORKSPACE_ROOT=${WORKSPACE_ROOT} - PYTHONPATH=/path/to/airbyte_workspace # Add this line ports: - "8001:8001" volumes: - workspace:${WORKSPACE_ROOT} - data:${CONFIG_ROOT}
3. Restart Airbyte Services: - Restart the Airbyte services to apply the changes. sh # Restart Airbyte services docker-compose down docker-compose up -d
### Summary - Locate Docker Compose File: Find your docker-compose.yaml
file. - Modify Docker Compose File: Add the PYTHONPATH
environment variable to the airbyte-server
service configuration. - Restart Services: Restart the Airbyte services to apply the changes. By setting the PYTHONPATH
in the airbyte-server
container, you ensure that the custom Python module is accessible, allowing your custom authenticator to be recognized. For more details, you can refer to the [OAuthAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 3:26 PMkapa.ai
05/29/2024, 3:26 PMkapa.ai
05/29/2024, 3:26 PMPYTHONPATH
environment variable for custom authenticators. Given the constraints and the issues you're facing, let's focus on a more straightforward approach that aligns with the documented capabilities of Airbyte. ### Using the Connection Builder UI Based on the provided knowledge sources, the Connection Builder UI does not support adding custom headers directly through the request_options_provider
or custom authenticator classes. Therefore, the best approach is to work within the documented capabilities of Airbyte. ### Documented Approach 1. OAuthAuthenticator Configuration: - Use the OAuthAuthenticator
type in the YAML configuration to handle OAuth authentication. 2. Custom Headers: - If the Connection Builder UI does not support adding custom headers directly, you may need to consider extending the connector's codebase outside the Connection Builder UI. ### Example Configuration Here’s an example of how to configure the OAuthAuthenticator
in the YAML: yaml base_requester: type: HttpRequester url_base: "<https://developer.api.stg.walmart.com/>" http_method: "GET" authenticator: type: "OAuthAuthenticator" client_id: '{{ config["client_id"] }}' grant_type: "client_credentials" client_secret: '{{ config["client_secret"] }}' refresh_request_body: {{}} token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>"
### Summary - OAuthAuthenticator: Use the OAuthAuthenticator
type in the YAML configuration to handle OAuth authentication. - Custom Headers: If the Connection Builder UI does not support adding custom headers directly, consider extending the connector's codebase outside the Connection Builder UI. For more details, you can refer to the [OAuthAuthenticator Documentation](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/authentication#oauth). If you need further assistance, feel free to ask!Jonathan Sider
05/29/2024, 4:08 PMkapa.ai
05/29/2024, 4:08 PMkapa.ai
05/29/2024, 4:08 PMrequest_options_provider
or custom authenticator classes. However, you can achieve this by extending the connector's codebase.
### Steps to Add Custom Headers to OAuth
1. Create a Custom Authenticator Class:
- Create a Python file for your custom authenticator. For example, name it custom_authenticator.py
.
python
# custom_authenticator.py
from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator
class WMCustomOAuthAuthenticator(OAuthAuthenticator):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_auth_header(self):
headers = super().get_auth_header()
headers['WM_SVC.NAME'] = 'XXXXXXXX'
headers['Accept'] = 'application/json'
headers['WM_QOS.CORRELATION_ID'] = 'XXXX_AB'
headers['WM_CONSUMER.CHANNEL.TYPE'] = 'Seller'
return headers
2. Place the Python File in the Airbyte Workspace:
- Copy the custom_authenticator.py
file into the airbyte_workspace
directory. This directory is typically mounted to the Airbyte containers, making it accessible.
sh
# Example command to copy the file into the Docker volume
docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
3. Update the Connector Configuration:
- Use the OAuthAuthenticator
type in the YAML configuration and ensure the custom authenticator is correctly referenced in the code.
yaml
base_requester:
type: HttpRequester
url_base: "<https://developer.api.stg.walmart.com/>"
http_method: "GET"
authenticator:
type: "OAuthAuthenticator"
class_name: "custom_authenticator.WMCustomOAuthAuthenticator"
client_id: '{{ config["client_id"] }}'
grant_type: "client_credentials"
client_secret: '{{ config["client_secret"] }}'
refresh_request_body: {{}}
token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>"
4. Ensure Python Path Includes Custom Module:
- Make sure that the Python path includes the directory where custom_authenticator.py
is located. You can do this by setting the PYTHONPATH
environment variable in the airbyte-server
container.
yaml
# docker-compose.yaml
version: '3'
services:
airbyte-server:
image: airbyte/server:${VERSION}
container_name: airbyte-server
restart: unless-stopped
environment:
- PYTHONPATH=/path/to/airbyte_workspace # Add this line
ports:
- "8001:8001"
volumes:
- workspace:${WORKSPACE_ROOT}
- data:${CONFIG_ROOT}
5. Restart Airbyte Services:
- Restart the Airbyte services to ensure that the new code is loaded.
sh
# Restart Airbyte services
docker-compose down
docker-compose up -d
### Summarykapa.ai
05/29/2024, 4:08 PMrequest_options_provider
or custom authenticator classes. However, you can achieve this by extending the connector's codebase. ### Steps to Add Custom Headers to OAuth 1. Create a Custom Authenticator Class: - Create a Python file for your custom authenticator. For example, name it custom_authenticator.py
. python # custom_authenticator.py from airbyte_cdk.sources.declarative.auth.oauth import OAuthAuthenticator class WMCustomOAuthAuthenticator(OAuthAuthenticator): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get_auth_header(self): headers = super().get_auth_header() headers['WM_SVC.NAME'] = 'XXXXXXXX' headers['Accept'] = 'application/json' headers['WM_QOS.CORRELATION_ID'] = 'XXXX_AB' headers['WM_CONSUMER.CHANNEL.TYPE'] = 'Seller' return headers
2. Place the Python File in the Airbyte Workspace: - Copy the custom_authenticator.py
file into the airbyte_workspace
directory. This directory is typically mounted to the Airbyte containers, making it accessible. sh # Example command to copy the file into the Docker volume docker cp custom_authenticator.py <container_id>:/path/to/airbyte_workspace/
3. Update the Connector Configuration: - Use the OAuthAuthenticator
type in the YAML configuration and ensure the custom authenticator is correctly referenced in the code. yaml base_requester: type: HttpRequester url_base: "<https://developer.api.stg.walmart.com/>" http_method: "GET" authenticator: type: "OAuthAuthenticator" class_name: "custom_authenticator.WMCustomOAuthAuthenticator" client_id: '{{ config["client_id"] }}' grant_type: "client_credentials" client_secret: '{{ config["client_secret"] }}' refresh_request_body: {{}} token_refresh_endpoint: "<https://api-gateway.walmart.com/v3/token>"
4. Ensure Python Path Includes Custom Module: - Make sure that the Python path includes the directory where custom_authenticator.py
is located. You can do this by setting the PYTHONPATH
environment variable in the airbyte-server
container. yaml # docker-compose.yaml version: '3' services: airbyte-server: image: airbyte/server:${VERSION} container_name: airbyte-server restart: unless-stopped environment: - PYTHONPATH=/path/to/airbyte_workspace # Add this line ports: - "8001:8001" volumes: - workspace:${WORKSPACE_ROOT} - data:${CONFIG_ROOT}
5. Restart Airbyte Services: - Restart the Airbyte services to ensure that the new code is loaded. sh # Restart Airbyte services docker-compose down docker-compose up -d
### Summary - Custom Authenticator Class: Create a Python file (custom_authenticator.py
) with your custom authenticator class. - Place in Airbyte Workspace: Copy the Python file into the airbyte_workspace
directory. - YAML Configuration: Use the OAuthAuthenticator
type in the YAML configuration and reference the custom authenticator class. - Set PYTHONPATH: Ensure the PYTHONPATH
includes the