Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass auth headers for virtualHubVnetConnection support across different tenants #11237

Merged
merged 6 commits into from
Mar 11, 2020

Conversation

nagula-ritvika
Copy link
Contributor

@nagula-ritvika nagula-ritvika commented Mar 3, 2020

Description

The VirtualHubVnetConnection resource uses VnetPeering in its underlying implementation. To support peering a vnet to a hub across different tenants, we need to pass auxiliary authorization headers. These headers are not being passed due to a code bug.

Updated the cmdlets New-AzVirtualHubVnetConnection and Update-AzVirtualHubVnetConnection to pass the required headers.

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

@adxsdkps
Copy link
Collaborator

adxsdkps commented Mar 3, 2020

Can one of the admins verify this patch?

@isra-fel isra-fel self-assigned this Mar 4, 2020
@dedhar
Copy link
Contributor

dedhar commented Mar 4, 2020

                this.CreateOrUpdateVirtualHub(this.ResourceGroupName, this.ParentResourceName, parentVirtualHub, parentVirtualHub.Tag, auxAuthHeader);

----- What happens if auxAuthHeader is null? do you want to initialize to empty dictionary

@dedhar
Copy link
Contributor

dedhar commented Mar 4, 2020

Do you have to fix Update hub also? Can update or create hub ever pass hub vnet connection in the input request and hit same issue

@nagula-ritvika
Copy link
Contributor Author

                this.CreateOrUpdateVirtualHub(this.ResourceGroupName, this.ParentResourceName, parentVirtualHub, parentVirtualHub.Tag, auxAuthHeader);

----- What happens if auxAuthHeader is null? do you want to initialize to empty dictionary

If the auth header is null then the code calls the CreateORUpdate method which internally takes cares of the empty dictionary.

@nagula-ritvika
Copy link
Contributor Author

Do you have to fix Update hub also? Can update or create hub ever pass hub vnet connection in the input request and hit same issue

yup, you were right. updated the hub cmdlets also.

Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

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

LGTM generally. Please follow the requirement in the PR's description to add a changelog entry. Thanks!

@dedhar
Copy link
Contributor

dedhar commented Mar 5, 2020

Changes look good to me. Signing off from vWAN Team

@isra-fel
Copy link
Member

isra-fel commented Mar 6, 2020

/azp run azure-powershell - powershell-core

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@nagula-ritvika
Copy link
Contributor Author

Hi, can someone start the build again please

@isra-fel
Copy link
Member

/azp run azure-powershell - powershell-core

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@isra-fel isra-fel self-assigned this Mar 11, 2020
@isra-fel isra-fel merged commit 36ea8c1 into Azure:master Mar 11, 2020
dingmeng-xue pushed a commit to dingmeng-xue/azure-powershell that referenced this pull request Mar 29, 2020
…ubVnetConn

Pass auth headers for virtualHubVnetConnection support across different tenants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants