Skip to content

feat(application-integration-tool): add dynamic authentication configuration support #469

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AlankritVerma01
Copy link
Contributor

Fixes: #464


This PR adds support for dynamic authentication configuration in the Application Integration tools. When a connection’s authOverrideEnabled flag is true, the generated IntegrationConnectorTool will now carry a dynamicAuthConfig payload (defaulting to {"userToken": null}) and automatically inject it into every call. The underlying ConnectionsClient.execute_connection() method was also extended to accept an optional dynamic_auth_config parameter and include it in the JSON body.

What changed

  1. ApplicationIntegrationToolset

    • Pass dynamic_auth_config={"userToken": None} into each IntegrationConnectorTool when authOverrideEnabled is true.
  2. ConnectionsClient.execute_connection()

    • Added dynamic_auth_config: Optional[Dict] arg.
    • If provided, include "dynamicAuthConfig" in the POST body to the Connectors API.
  3. IntegrationConnectorTool.run_async()

    • Store dynamic_auth_config on the tool instance.
    • Inject dynamicAuthConfig into the args before calling the wrapped RestApiTool.
    • Properly await the inner call() if it returns a coroutine.
  4. Tests

    • Unit:
      • In test_connections_client.py, added test_execute_connection_includes_dynamic_auth_config.
      • In test_application_integration_toolset.py, added:
        • test_tool_has_dynamic_auth_config_when_override_enabled
        • test_integration_connector_injects_dynamic_authConfig
    • Verified existing tests in both application_integration_tool and connections_client continue to pass.

Test Plan

  1. Run the new unit tests

    pytest tests/unittests/tools/application_integration_tool/clients/test_connections_client.py::test_execute_connection_includes_dynamic_auth_config
    pytest tests/unittests/tools/application_integration_tool/test_application_integration_toolset.py::test_tool_has_dynamic_auth_config_when_override_enabled
    pytest tests/unittests/tools/application_integration_tool/test_application_integration_toolset.py::test_integration_connector_injects_dynamic_authConfig
  2. Run the full suite to confirm no regressions:

    pytest

Checklist

@AlankritVerma01 AlankritVerma01 changed the title Add dynamic auth config feat(application-integration-tool): add dynamic authentication configuration support Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Dynamic Auth Config for Integration Connectors tool.
2 participants