[DataMigration] Fix MSRC exposed authkey - #29735
Merged
Merged
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a security concern in the DataMigration AutoRest module by preventing an integration runtime authentication key from being written to the console, and also updates/generated supporting metadata for the module/UX definitions.
Changes:
- Remove logging of the IR registration auth key from
IRRegister.ps1. - Add a new UX command definition JSON for
Invoke-AzDataMigrationRetryToSqlDb. - Update DataMigration.Autorest assembly version and regenerate
generate-info.json.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/DataMigration/DataMigration.Autorest/UX/Microsoft.Sql/servers-databaseMigrations.json | Adds UX definition for retrying SQL DB migrations (currently missing required parameter in help/example metadata). |
| src/DataMigration/DataMigration.Autorest/Properties/AssemblyInfo.cs | Bumps assembly version to 1.1.0. |
| src/DataMigration/DataMigration.Autorest/generate-info.json | Updates generation identifier. |
| src/DataMigration/DataMigration.Autorest/custom/Helpers/IRRegister.ps1 | Stops printing the auth key in host output during IR registration. |
Comment on lines
+19
to
+23
| "-ResourceGroupName <String>", | ||
| "-SqlDbInstanceName <String>", | ||
| "[-SubscriptionId <String>]", | ||
| "-TargetDbName <String>" | ||
| ] |
Comment on lines
+43
to
+47
| { | ||
| "name": "-TargetDbName", | ||
| "value": "[Path.targetDbName]" | ||
| } | ||
| ] |
| "commands": [ | ||
| { | ||
| "name": "Invoke-AzDataMigrationRetryToSqlDb", | ||
| "description": "Retry on going migration for the database.", |
| }, | ||
| "examples": [ | ||
| { | ||
| "description": "Retry on going migration for the database.", |
Pan-Qi
marked this pull request as draft
June 16, 2026 07:01
Comment on lines
+153
to
+154
| Tags = 'Azure', 'ResourceManager', 'ARM', 'Sql', 'Database', 'Data', 'Migration', | ||
| 'Service' |
Comment on lines
+9
to
+11
| "name": "Invoke-AzDataMigrationRetryToSqlDb", | ||
| "description": "Retry on going migration for the database.", | ||
| "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/retry", |
Comment on lines
+29
to
+31
| { | ||
| "description": "Retry on going migration for the database.", | ||
| "parameters": [ |
Comment on lines
102
to
104
| process { | ||
| Write-Host "Start to register IR with key: $key" | ||
| Write-Host "Start to register IR with key." | ||
|
|
Pan-Qi
marked this pull request as ready for review
June 16, 2026 09:23
VeryEarly
reviewed
Jun 17, 2026
|
|
||
| process { | ||
| Write-Host "Start to register IR with key: $key" | ||
| Write-Host "Start to register IR with key." |
Collaborator
There was a problem hiding this comment.
"Start IR registering ..."
Comment on lines
31
to
33
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataMigration", "..\..\generated\DataMigration\DataMigration.Autorest\Az.DataMigration.csproj", "{852A2647-CCB9-4043-8649-C42AE9D44D38}" | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataMigration", "..\..\generated\DataMigration\DataMigration.Autorest\Az.DataMigration.csproj", "{F13CDB5A-AC57-4D36-84A2-FDDC95F0975E}" | ||
| EndProject |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
62
to
+66
| # Script files (.ps1) that are run in the caller's environment prior to importing this module. | ||
| # ScriptsToProcess = @() | ||
| ScriptsToProcess = @() | ||
|
|
||
| # Type files (.ps1xml) to be loaded when importing this module | ||
| # TypesToProcess = @() | ||
| TypesToProcess = @() |
|
|
||
| process { | ||
| Write-Host "Start to register IR with key: $key" | ||
| Write-Host "Starting IR registration with key." |
Comment on lines
+9
to
+13
| "name": "Invoke-AzDataMigrationRetryToSqlDb", | ||
| "description": "Retry on going migration for the database.", | ||
| "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/retry", | ||
| "help": { | ||
| "learnMore": { |
Comment on lines
+32
to
33
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataMigration", "..\..\generated\DataMigration\DataMigration.Autorest\Az.DataMigration.csproj", "{F13CDB5A-AC57-4D36-84A2-FDDC95F0975E}" | ||
| EndProject |
| "commands": [ | ||
| { | ||
| "name": "Invoke-AzDataMigrationRetryToSqlDb", | ||
| "description": "Retry on going migration for the database.", |
| }, | ||
| "examples": [ | ||
| { | ||
| "description": "Retry on going migration for the database.", |
VeryEarly
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.