Skip to content

fix: Add support for create connection with on-premises gateway#54

Merged
aviatco merged 14 commits intomicrosoft:mainfrom
aviatco:dev/aviatcohen/create-connection-onpremisesgateway
Nov 12, 2025
Merged

fix: Add support for create connection with on-premises gateway#54
aviatco merged 14 commits intomicrosoft:mainfrom
aviatco:dev/aviatcohen/create-connection-onpremisesgateway

Conversation

@aviatco
Copy link
Copy Markdown
Collaborator

@aviatco aviatco commented Oct 30, 2025

📥 Pull Request

✨ Description of new changes

Overview

Enhanced the fabric CLI to support creating connections with on-premises gateway connectivity, including proper parameter validation and credential handling for gateway-specific scenarios according to API documentation.

Key Changes

Connection Parameter Validation (fab_cmd_mkdir_utils.py)

  • Added support for onpremisesgateway connectivity type in credential validation
  • Implemented validation for gateway-specific credential values requiring gatewayId and encryptedCredentials parameters
  • Added type safety checks to ensure credential values are valid JSON objects before processing
  • Enhanced error handling with descriptive messages for missing or invalid gateway parameters

Gateway Credential Handling

  • Extended _validate_credential_params() function to handle on-premises gateway authentication flows
  • Added support for values parameter structure specific to on-premises gateway connectivity
  • Implemented proper credential parameter mapping for on-premises gateway connections in connection request building

Error Handling Improvements

  • Added robust validation to prevent AttributeError when processing malformed credential data
  • Enhanced error messages to clearly indicate missing gateway-specific parameters
  • Implemented early validation with fail-fast behavior for invalid credential formats

Technical Details

  • Connectivity Type: Added onpremisesgateway support.
  • Required Parameters: gatewayId, encryptedCredentials for on-premises gateway connections
  • Credential Structure: Support for nested values parameter containing gateway authentication details
  • Validation: Type checking ensures credential values are dictionaries before key access

Important Note

⚠️ Current Limitation: This feature is currently supported only when users provide the encrypted credentials. The CLI does not handle credential encryption in this implementation.

Testing

  • Added validation for gateway parameter requirements
  • Included error handling tests for malformed credential data
  • Verified proper credential mapping for gateway connectivity scenarios

This enhancement enables users to create secure connections through on-premises data gateways, expanding the CLI's connectivity options for hybrid cloud scenarios.

@aviatco aviatco requested a review from a team as a code owner October 30, 2025 15:01
Co-authored-by: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com>
may-hartov
may-hartov previously approved these changes Nov 5, 2025
@ayeshurun
Copy link
Copy Markdown
Collaborator

please add changie entry

@aviatco aviatco merged commit 5c71f08 into microsoft:main Nov 12, 2025
9 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.

[BUG] Unable to Create Connection with Basic Auth using Gateway

3 participants