Skip to content

[DataMigration] Fix MSRC exposed authkey - #29735

Merged
VeryEarly merged 7 commits into
mainfrom
bernard-fix-exposed-authkey-msrc
Jun 18, 2026
Merged

[DataMigration] Fix MSRC exposed authkey#29735
VeryEarly merged 7 commits into
mainfrom
bernard-fix-exposed-authkey-msrc

Conversation

@Pan-Qi

@Pan-Qi Pan-Qi commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • 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.
    • 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

Copilot AI review requested due to automatic review settings June 16, 2026 06:30
@azure-client-tools-bot-prd

Copy link
Copy Markdown
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Pan-Qi changed the title Fix MSRC exposed authkey [DataMigration] Fix MSRC exposed authkey Jun 16, 2026
@Pan-Qi
Pan-Qi marked this pull request as draft June 16, 2026 07:01
Copilot AI review requested due to automatic review settings June 16, 2026 08:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

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
Pan-Qi marked this pull request as ready for review June 16, 2026 09:23

process {
Write-Host "Start to register IR with key: $key"
Write-Host "Start to register IR with key."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"Start IR registering ..."

Copilot AI review requested due to automatic review settings June 17, 2026 01:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread src/DataMigration/DataMigration/ChangeLog.md Outdated
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
@Pan-Qi
Pan-Qi requested a review from VeryEarly June 17, 2026 05:21
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 17, 2026 15:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

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
VeryEarly merged commit 1bd7ba9 into main Jun 18, 2026
12 checks passed
@VeryEarly
VeryEarly deleted the bernard-fix-exposed-authkey-msrc branch June 18, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants