feat(application-integration-tool): add dynamic authentication configuration support #469
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #464
This PR adds support for dynamic authentication configuration in the Application Integration tools. When a connection’s
authOverrideEnabled
flag is true, the generatedIntegrationConnectorTool
will now carry adynamicAuthConfig
payload (defaulting to{"userToken": null}
) and automatically inject it into every call. The underlyingConnectionsClient.execute_connection()
method was also extended to accept an optionaldynamic_auth_config
parameter and include it in the JSON body.What changed
ApplicationIntegrationToolset
dynamic_auth_config={"userToken": None}
into eachIntegrationConnectorTool
whenauthOverrideEnabled
is true.ConnectionsClient.execute_connection()
dynamic_auth_config: Optional[Dict]
arg."dynamicAuthConfig"
in the POST body to the Connectors API.IntegrationConnectorTool.run_async()
dynamic_auth_config
on the tool instance.dynamicAuthConfig
into the args before calling the wrappedRestApiTool
.await
the innercall()
if it returns a coroutine.Tests
test_connections_client.py
, addedtest_execute_connection_includes_dynamic_auth_config
.test_application_integration_toolset.py
, added:test_tool_has_dynamic_auth_config_when_override_enabled
test_integration_connector_injects_dynamic_authConfig
application_integration_tool
andconnections_client
continue to pass.Test Plan
Run the new unit tests
Run the full suite to confirm no regressions:
Checklist
application_integration_tool
andconnections_client
still pass (not all as some were failing from before)