Skip to content

Conversation

RubenAMtz
Copy link
Collaborator

This pull request updates authentication and configuration throughout the SDK and documentation to use OIDC access tokens and workspace scoping instead of the previous API key approach. The changes affect the client initialization, environment variable names, and request headers, ensuring more secure and flexible authentication. All relevant usage examples, guides, and documentation have been revised to reflect these updates.

Authentication and Client Initialization:

Environment Variable and Configuration Updates:

  • Updated all environment variable references and .env file examples to use T2E_ACCESS_TOKEN and T2E_WORKSPACE_NAME instead of API key variables. [1] [2] [3] [4] [5] [6] [7]

Request Header Changes:

  • Changed request headers to use Authorization: Bearer <access_token> and added support for X-Workspace-Name when provided, removing the legacy X-API-Key header. [1] [2] [3]

Documentation and Example Consistency:

Backward Compatibility and Error Handling:

  • Updated error handling to require access_token instead of api_key during client initialization, ensuring users migrate to the new authentication method.

Let me know if you have questions about how to migrate your code or environment to use the new authentication scheme!

RubenAMtz and others added 11 commits October 1, 2025 02:24
… instead of api_key. Update documentation and examples accordingly to reflect the new authentication method.
…mentation

- Introduced a new method `test_connection_detailed` in `ConnectorsResource` to return detailed connection test results, including elapsed time.
- Updated documentation to include examples for both basic and detailed connection testing.
…sword storage and secret management

- Modified `ConnectorBase`, `ConnectorCreate`, and `ConnectorUpdate` models to allow for optional password and password secret ID fields.
- Enhanced `ConnectorsResource` to validate password or secret ID for Snowflake connections, ensuring either can be provided.
- Updated tests to conditionally create Snowflake connectors based on the presence of required environment variables, with a fallback to PostgreSQL for local testing.
…tication

- Updated the test for creating Snowflake connectors to prefer key-pair authentication if available, falling back to password authentication if not.
- Improved environment variable handling for Snowflake connection parameters, including optional passphrase support for encrypted private keys.
- Added detailed logging for successful connector creation and warnings for missing environment variables.
- Updated the test suite for connectors to catch exceptions during connector updates and listing by type, ensuring that errors do not block the entire test suite.
- Added informative logging for skipped tests due to errors, enhancing the robustness of the testing process.
…flake connectors

- Added logic to resolve the password_secret_id from existing connector data if not provided, ensuring API validation without rotating secrets for non-Snowflake databases.
- Improved handling of password and secret management during connector updates.
- Updated the connector test suite to include non-blocking connection tests for all created connectors, improving error handling and logging.
- Added both boolean and detailed connection tests, providing comprehensive feedback on connection status and elapsed time for each connector.
- Improved resilience of tests by ensuring exceptions during connection tests are logged without interrupting the test flow.
…or selection logic

- Updated the `BaseTestRunner` to explicitly define the type of `client` as `Optional[Text2EverythingClient]`.
- Simplified the connector selection process in `ExecutionsTestRunner` to prioritize an environment-provided connector ID, enhancing flexibility and reducing reliance on automatic connector creation.
…iable

- Updated the chat testing logic to prefer the `EXECUTIONS_CONNECTOR_ID` from environment variables for connector selection, enhancing flexibility.
- Removed the previous automatic connector search and creation process, simplifying the setup for chat operations.
- Bump SDK version from 0.1.5 to 0.1.6
- Add built distribution files (wheel and tar.gz) to dist/
- Update quick start notebook to use h2o_authn TokenProvider for authentication
- Replace direct ACCESS_TOKEN usage with platform token-based auth flow
- Fix SDK installation path to reference dist/ directory

This change improves authentication by integrating the h2o_authn library,
providing a more secure token refresh mechanism using platform tokens
instead of static OIDC access tokens.
@RubenAMtz RubenAMtz merged commit d266e43 into main Oct 7, 2025
3 checks passed
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.

1 participant