Skip to content

Replaced parameter EnableRbacAuthorization by DisableRbacAuthorization in New-AzKeyVault and Update-AzKeyVault #24675

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 9 commits into from
Apr 24, 2024

Conversation

BethanyZhou
Copy link
Contributor

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copy link

azure-client-tools-bot-prd bot commented Apr 22, 2024

️✔️Az.Accounts
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Compute
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.CosmosDB
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.EventHub
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Az.KeyVault
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Breaking Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Signature Check
⚠️PowerShell Core - Windows
Type Cmdlet Description Remediation
⚠️ Get-AzKeyVaultManagedHsmRegion Get-AzKeyVaultManagedHsmRegion Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
⚠️ Get-AzKeyVaultManagedHsmRegion Get-AzKeyVaultManagedHsmRegion changes the confirm impact. Please ensure that the change in ConfirmImpact is justified Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact.
⚠️Windows PowerShell - Windows
Type Cmdlet Description Remediation
⚠️ Get-AzKeyVaultManagedHsmRegion Get-AzKeyVaultManagedHsmRegion Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
⚠️ Get-AzKeyVaultManagedHsmRegion Get-AzKeyVaultManagedHsmRegion changes the confirm impact. Please ensure that the change in ConfirmImpact is justified Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact.
⚠️Help Example Check
⚠️PowerShell Core - Windows
Type Cmdlet Example Line RuleName Description Extent Remediation
⚠️ Update-AzKeyVault 1 1 Unassigned_Variable Get-AzKeyVault -VaultName $keyVaultName is a null-valued parameter value. -VaultName Assign value for $keyVaultName.
⚠️ Update-AzKeyVault 1 1 Unassigned_Variable Get-AzKeyVault -ResourceGroupName $resourceGroupName is a null-valued parameter value. -ResourceGroupName Assign value for $resourceGroupName.
⚠️ Update-AzKeyVault 2 1 Unassigned_Variable Get-AzKeyVault -VaultName $keyVaultName is a null-valued parameter value. -VaultName Assign value for $keyVaultName.
⚠️ Update-AzKeyVault 2 1 Unassigned_Variable Get-AzKeyVault -ResourceGroupName $resourceGroupName is a null-valued parameter value. -ResourceGroupName Assign value for $resourceGroupName.
⚠️ Update-AzKeyVault 3 1 Unassigned_Variable Get-AzKeyVault -VaultName $keyVaultName is a null-valued parameter value. -VaultName Assign value for $keyVaultName.
⚠️ Update-AzKeyVault 4 1 Unassigned_Variable Get-AzKeyVault -VaultName $keyVaultName is a null-valued parameter value. -VaultName Assign value for $keyVaultName.
⚠️Windows PowerShell - Windows
Type Cmdlet Example Line RuleName Description Extent Remediation
⚠️ Update-AzKeyVault 1 1 Unassigned_Variable Get-AzKeyVault -VaultName $keyVaultName is a null-valued parameter value. -VaultName Assign value for $keyVaultName.
⚠️ Update-AzKeyVault 1 1 Unassigned_Variable Get-AzKeyVault -ResourceGroupName $resourceGroupName is a null-valued parameter value. -ResourceGroupName Assign value for $resourceGroupName.
⚠️ Update-AzKeyVault 2 1 Unassigned_Variable Get-AzKeyVault -VaultName $keyVaultName is a null-valued parameter value. -VaultName Assign value for $keyVaultName.
⚠️ Update-AzKeyVault 2 1 Unassigned_Variable Get-AzKeyVault -ResourceGroupName $resourceGroupName is a null-valued parameter value. -ResourceGroupName Assign value for $resourceGroupName.
⚠️ Update-AzKeyVault 3 1 Unassigned_Variable Get-AzKeyVault -VaultName $keyVaultName is a null-valued parameter value. -VaultName Assign value for $keyVaultName.
⚠️ Update-AzKeyVault 4 1 Unassigned_Variable Get-AzKeyVault -VaultName $keyVaultName is a null-valued parameter value. -VaultName Assign value for $keyVaultName.
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️File Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️UX Metadata Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Test
⚠️ - Linux
Type Title Current Coverage Description
⚠️ Test Coverage Less Than 50% 22.09 % Test coverage for the module cannot be lower than 50%.
⚠️ - MacOS
Type Title Current Coverage Description
⚠️ Test Coverage Less Than 50% 22.09% Test coverage for the module cannot be lower than 50%.
⚠️PowerShell Core - Windows
Type Title Current Coverage Description
⚠️ Test Coverage Less Than 50% 22.09% Test coverage for the module cannot be lower than 50%.
⚠️Windows PowerShell - Windows
Type Title Current Coverage Description
⚠️ Test Coverage Less Than 50% 22.09% Test coverage for the module cannot be lower than 50%.
️✔️Az.ManagedServiceIdentity
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Monitor
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Network
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.OperationalInsights
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.PrivateDns
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Resources
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.ServiceBus
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Sql
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Storage
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows

@BethanyZhou BethanyZhou added Breaking Change Release This PR contains breaking change Do Not Merge 🚫 labels Apr 22, 2024
Copy link

To the author of the pull request,
This PR was labeled "Breaking Change Release" because it contains breaking changes.

  • According to our policy, breaking changes can only take place during major release and they must be preannounced.
  • Please follow our guide on the detailed steps.
  • Required: Please fill in the task below to facilitate our contact,you will receive notifications related to breaking changes.

Copy link

‼️ DO NOT MERGE THIS PR ‼️
This PR was labeled "Do Not Merge" because it contains code change that cannot be merged. Please contact the reviewer for more information.

@YanaXu YanaXu merged commit feae308 into Azure:main Apr 24, 2024
12 checks passed
@MattGal
Copy link
Member

MattGal commented May 29, 2024

@YanaXu / @BethanyZhou ; can you please comment as to why did you need to remove the -EnableRbacAuthorization parameter instead of making it a no-op?

My team has release branches that contain usage of this flag, and the version of the Az PS Cmdlets is necessarily updated on build agents as a security measure, so we've had to make code changes to work around this.

Leaving it in seems like a harmless thing to do, but removing it breaks users, so I'd like to understand the motivation.

@BethanyZhou BethanyZhou deleted the bez/enableAuthorization branch May 30, 2024 01:37
@BethanyZhou
Copy link
Contributor Author

Hi @MattGal , thanks for asking.

Azure Key Vault is migrating from vault access policy to an Azure role-based access control (Azure RBAC) permission model. Azure RBAC is the default and recommended authorization system for Azure Key Vault. See Migrate from vault access policy to an Azure role-based access control permission model.

User had to specify EnableRbacAuthorization parameter explicitly before, which implies access policy is the default authorization systems. That's why we removed parameter EnableRbacAuthorization. Making it a no-op is an option but it's not a good practice for a new user. We preannounced the upcoming breaking change two sprints (almost two months) in advance to let user be aware of this and take actions when major version comes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Release This PR contains breaking change needs-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants