-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Application Gateway Mutual Authentication Cmdlets. #13277
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
Conversation
VeryEarly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks to me you do not need so many cmdlet:
New-AzApplicationGatewayClientAuthConfiguration
New-AzApplicationGatewaySslProfile
New-AzApplicationGatewayTrustedClientCertificate
are enough, other cmdlets can be done by having a new cmdlet update-azapplicationgateway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rename TrustedClientCertificates as TrustedClientCertificate,
powershell use singularity for parameter names:
https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/design-guidelines/cmdlet-best-practices.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is consistent with other parameter names in NewAzureApplicationGatewayCommand, like SslCertificates, HttpListeners, FrontendPorts, etc., which take a list of PSObjects. Also, the naming TrustedClientCertificates makes it clear to the customer that this parameter takes a list of PSObjects verses a parameter like SslPolicy which takes on a single PSObject.
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.commands.network.newazureapplicationgatewaycommand?view=azurerm-ps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this parameter takes a list of objects, but it also takes one signle object, aka -TrustedClientCertificates @{...} is totally OK. That is why we ask everyone to use singular name.
Considering exisiting parameters I won't request you to revise, but I do hope you understand why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rename SslProfiles as SslProfile
powershell use singularity for parameter names:
https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/design-guidelines/cmdlet-best-practices.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same reason as above.
...Network/ApplicationGateway/SslPolicy/RemoveAzureApplicationGatewaySslProfilePolicyCommand.cs
Outdated
Show resolved
Hide resolved
...rk/Network/ApplicationGateway/SslPolicy/SetAzureApplicationGatewaySslProfilePolicyCommand.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this operation sending any request to azure?
It looks like this cmdlet only update ps object in memory. If so, no need for support should process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
...way/TrustedClientCertificate/RemoveAzureApplicationGatewayTrustedClientCertificateCommand.cs
Outdated
Show resolved
Hide resolved
...ateway/TrustedClientCertificate/SetAzureApplicationGatewayTrustedClientCertificateCommand.cs
Outdated
Show resolved
Hide resolved
VeryEarly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove localfeed and use published SDK instead?
ClientAuthConfiguration, SslProfile and TrustedClientCertificate also have parameters which cannot be set using set-azapplicationgateway. Please refer to Test-ApplicationGatewayCRUDWithMutualAuthentication in src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1 for examples. Also we have these cmndlets for other objects like sslcertificate, httplistener, etc., would be better to keep it for consistency :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this parameter takes a list of objects, but it also takes one signle object, aka -TrustedClientCertificates @{...} is totally OK. That is why we ask everyone to use singular name.
Considering exisiting parameters I won't request you to revise, but I do hope you understand why.
|
/azp run azure-powershell - windows-powershell |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Description
Implements the cmdlets to support application gateway private link feature.
Design Review PR:
Azure/azure-powershell-cmdlet-review-pr#654
Checklist
CONTRIBUTING.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added