Skip to content

Conversation

@saileshwar-skyflow
Copy link
Collaborator

Why

  • The current SDK restricts custom token endpoints, which blocks Bring Your Own Cloud (BYOC) integrations.

Outcome

  • Added a Custom Token URI option to enable BYOC support while maintaining full backward compatibility.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for custom token URIs to enable Bring Your Own Cloud (BYOC) integrations. The SDK now accepts an optional token_uri parameter in credentials, allowing users to specify custom authentication endpoints while maintaining backward compatibility with existing implementations.

Changes:

  • Added validation for custom token_uri in credentials using a new is_valid_url helper
  • Updated token generation functions to support token_uri override via options
  • Enhanced error handling with specific messages for token URI validation and bearer token retrieval failures

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
skyflow/utils/_helpers.py Added is_valid_url helper function to validate URLs
skyflow/utils/init.py Exported is_valid_url helper function
skyflow/utils/_skyflow_messages.py Added error messages for invalid token URI and bearer token failures
skyflow/utils/validations/_validations.py Added token URI validation in credentials and removed unnecessary validations
skyflow/vault/client/client.py Added token URI pass-through and fixed exception type
skyflow/service_account/_utils.py Added token URI validation and override support, improved error handling
tests/utils/test__helpers.py Added tests for is_valid_url function
tests/utils/validations/test__validations.py Added tests for token URI validation and removed obsolete test
tests/vault/client/test__client.py Added tests for bearer token generation with custom token URI
tests/utils/test__utils.py Added comprehensive tests for token generation with custom token URI
tests/service_account/test__utils.py Added tests for service account token generation error scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@saileshwar-skyflow saileshwar-skyflow changed the base branch from main to release/26.1.0 January 27, 2026 12:32
@saileshwar-skyflow saileshwar-skyflow merged commit ec98d8f into release/26.1.0 Jan 27, 2026
8 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.

4 participants