Skip to content

Multiple Radius Servers for VPN scenario #11550

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

Merged
merged 34 commits into from
May 7, 2020
Merged

Conversation

henry416
Copy link
Member

@henry416 henry416 commented Apr 10, 2020

Description

Add support for multiple radius servers in VPN scenarios (VPN Gateway and vWAN VpnServerConfiguration).

This cmdlet change requires 2020-03-01 network package.

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

@henry416
Copy link
Member Author

@msJinLei
Copy link
Contributor

@henry416 Please fix the failed tests

@anton-evseev
Copy link
Contributor

Hi @henry416, changes from network-march were merged into master. Please retarget your PR to master as well to make the release. Please also note that master was rebased due to credentials leaking into it so it's basically incompatible with network-march. My suggestion is to create a new branch from master and copy your changes there.

@henry416 henry416 changed the base branch from network-march to master April 13, 2020 17:05
@msJinLei
Copy link
Contributor

@henry416
Copy link
Member Author

@msJinLei Can you please review the changes. Specifically the behavior with parametersets (cannot have RadiusServerConfiguration and MultipleRadiusServersConfiguration coexist)

Copy link
Contributor

@msJinLei msJinLei left a comment

Choose a reason for hiding this comment

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

@henry416, Please check "VirtualNetworkGatewayTests.ps1" for the credential scan error.

@msJinLei
Copy link
Contributor

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@henry416
Copy link
Member Author

henry416 commented May 4, 2020

@msJinLei Please review

@msJinLei
Copy link
Contributor

msJinLei commented May 5, 2020

@msJinLei Please review

@msJinLei Seems like someone else's change is causing signature issues. I am suppressing this cmdlet that is unrelated to mine and it doesn't seem to be an actual issue.

"/Users/runner/runners/2.166.4/work/1/s/artifacts/Debug/Az.Network/Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.RemoveAzureSecurityPartnerProviderCommand","Remove-AzSecurityPartnerProvider","1","8510","Cmdlet 'Remove-AzSecurityPartnerProvider' has multiple parameter sets, but no defined default parameter set.","Define a default parameter set in the cmdlet attribute."

Yes, we just find signature check doesn't work for a long time. We just fix it recently.
For the issue you mentioned, can you provide a default parameter set for this cmdlet?

@henry416
Copy link
Member Author

henry416 commented May 6, 2020

@msJinLei Fixed

"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.RemoveAzureSecurityPartnerProviderCommand","Remove-AzSecurityPartnerProvider","1","8510","Cmdlet 'Remove-AzSecurityPartnerProvider' has multiple parameter sets, but no defined default parameter set.","Define a default parameter set in the cmdlet attribute."
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not suppress the error. You can set a default parameter for "GetAzureSecurityPartnerProviderCommand".

Copy link
Member Author

Choose a reason for hiding this comment

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

@msJinLei I'm not suppressing the error for GetAzureSecurityPartnerProviderCommand ? I don't alter that file at all in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

@msJinLei If you are referring to the ShouldProcess line for New-AzRadiusServer, it is because RadiusServer is a sub-object of gateway's VPN server configuration, simply describing a configuration (ip address, score, etc.). There is no need to implement shouldProcess for this subobject especially since running this cmdlet doesn't call Azure.

Copy link
Contributor

@msJinLei msJinLei May 6, 2020

Choose a reason for hiding this comment

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

@msJinLei I'm not suppressing the error for GetAzureSecurityPartnerProviderCommand ? I don't alter that file at all in this PR?

Default parameter set helps user to choose a parameter set when there is a conflict to bind inputs to existing parameter sets. And so this signature error cannot be suppressed.

Even if the issue is not caused by your PR, it does block your PR from merging. That's why I recommend you fix it in your PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

@msJinLei Ok, but I don't see a "GetAzureSecurityPartnerProviderCommand" error being thrown anywhere? The checks both in this PR and in my local static analysis runs don't show GetAzureSecurityPartnerProviderCommand throwing a static analysis error. The checks are passing all green.

Copy link
Contributor

Choose a reason for hiding this comment

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

@msJinLei Ok, but I don't see a "GetAzureSecurityPartnerProviderCommand" error being thrown anywhere? The checks both in this PR and in my local static analysis runs don't show GetAzureSecurityPartnerProviderCommand throwing a static analysis error. The checks are passing all green.

You should remove this line.


"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.RemoveAzureSecurityPartnerProviderCommand","Remove-AzSecurityPartnerProvider","1","8510","Cmdlet 'Remove-AzSecurityPartnerProvider' has multiple parameter sets, but no defined default parameter set.","Define a default parameter set in the cmdlet attribute."

Copy link
Member Author

Choose a reason for hiding this comment

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

@msJinLei Removing that existing static analysis line will cause checks to fail. RemoveAzureSecurityPartnerProviderCommand is owned by a separate team and I do not know the context of which parameter set to make as default for their powershell. Please ask them to change it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@msJinLei Removing that existing static analysis line will cause checks to fail. RemoveAzureSecurityPartnerProviderCommand is owned by a separate team and I do not know the context of which parameter set to make as default for their powershell. Please ask them to change it.
@henry416 We have fixed the issue in the master, please rebase the latest one.

Copy link
Member Author

Choose a reason for hiding this comment

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

@msJinLei Done.

"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.RemoveAzureSecurityPartnerProviderCommand","Remove-AzSecurityPartnerProvider","1","8510","Cmdlet 'Remove-AzSecurityPartnerProvider' has multiple parameter sets, but no defined default parameter set.","Define a default parameter set in the cmdlet attribute."
Copy link
Contributor

Choose a reason for hiding this comment

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

@msJinLei Ok, but I don't see a "GetAzureSecurityPartnerProviderCommand" error being thrown anywhere? The checks both in this PR and in my local static analysis runs don't show GetAzureSecurityPartnerProviderCommand throwing a static analysis error. The checks are passing all green.

You should remove this line.


"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.RemoveAzureSecurityPartnerProviderCommand","Remove-AzSecurityPartnerProvider","1","8510","Cmdlet 'Remove-AzSecurityPartnerProvider' has multiple parameter sets, but no defined default parameter set.","Define a default parameter set in the cmdlet attribute."

@henry416 henry416 requested a review from msJinLei May 6, 2020 08:33
@henry416
Copy link
Member Author

henry416 commented May 6, 2020

@msJinLei Removing that existing static analysis line will cause checks to fail. RemoveAzureSecurityPartnerProviderCommand is owned by a separate team and I do not know the context of which parameter set to make as default for their powershell. Please ask them to change it. (Git history shows Ishani Gupta as last author)

"Microsoft.Azure.PowerShell.Cmdlets.Network.dll","Microsoft.Azure.Commands.Network.RemoveAzureSecurityPartnerProviderCommand","Remove-AzSecurityPartnerProvider","1","8510","Cmdlet 'Remove-AzSecurityPartnerProvider' has multiple parameter sets, but no defined default parameter set.","Define a default parameter set in the cmdlet attribute."
Copy link
Contributor

Choose a reason for hiding this comment

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

@msJinLei Removing that existing static analysis line will cause checks to fail. RemoveAzureSecurityPartnerProviderCommand is owned by a separate team and I do not know the context of which parameter set to make as default for their powershell. Please ask them to change it.
@henry416 We have fixed the issue in the master, please rebase the latest one.

@henry416 henry416 requested a review from msJinLei May 7, 2020 09:22
@msJinLei msJinLei merged commit 88c5248 into Azure:master May 7, 2020
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