Skip to content

Conversation

@CDiezRodriguez
Copy link
Contributor

WHAT

Added support for OAuth2 authorization in asset data addresses within the create_asset method of BaseConnectorProviderService.

A new optional parameter oauth2_config has been added that accepts a dictionary with the following keys:

  • tokenUrl: URL to request the OAuth2 access token
  • clientId: The client ID for OAuth2 authentication
  • clientSecretKey: The key in the Vault where the client secret is stored

When provided, these values are added to the data address with the proper oauth2: prefix as expected by the connector.

WHY

The connector documentation states that HTTP Data Plane data addresses can be protected by OAuth2 authentication. However, the SDK's method did not support this configuration, limiting users from creating assets with OAuth2-protected backend data sources.

FURTHER NOTES

  • Added comprehensive docstring to the create_asset method documenting all parameters including the new oauth2_config
  • The implementation follows the connector's expected format for OAuth2 configuration (oauth2:tokenUrl, oauth2:clientId, oauth2:clientSecretKey)

Closes #175

@CDiezRodriguez CDiezRodriguez self-assigned this Dec 16, 2025
@github-actions
Copy link

github-actions bot commented Dec 16, 2025

🧪 Test Summary

🎉 Status: SUCCESS

📊 Unit Tests

Passed Failed Total Coverage
✅ 407 ❌ 0 📋 407 📈 68.06%
Run Details
  • Branch: 176/merge
  • Commit: 7e7aaef7ccac608aebd5b67268bb1df271f7ddd8
  • Trigger: pull_request

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 16, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

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.

Enable Support for Connector Assets with Data Addresses Protected by OAuth2

2 participants