diff --git a/.github/scripts/setup/Initialize-Product.ps1 b/.github/scripts/setup/Initialize-Product.ps1
index a5b84ba..b6dba7e 100644
--- a/.github/scripts/setup/Initialize-Product.ps1
+++ b/.github/scripts/setup/Initialize-Product.ps1
@@ -46,14 +46,13 @@ $apiProject = "$RepositoryRoot/src/Presentation.Api/Presentation.Api.csproj"
$webProject = "$RepositoryRoot/src/Presentation.Web/Presentation.Web.csproj"
$e2eProject = "$RepositoryRoot/src/Tests.Endtoend.Api/Tests.Endtoend.Api.csproj"
if (-not (Test-Path $e2eProject)) { $e2eProject = '' }
-foreach ($path in @($apiProject, $webProject, "$RepositoryRoot/.azure/scripts/New-EntraDotnetSolution.ps1", "$RepositoryRoot/.github/scripts/cd/New-Github-Azure-Federation.ps1")) {
+foreach ($path in @($apiProject, $webProject, "$PSScriptRoot/Setup-Session.ps1", "$RepositoryRoot/.azure/scripts/New-EntraDotnetSolution.ps1", "$RepositoryRoot/.github/scripts/cd/New-Github-Azure-Federation.ps1")) {
if (-not (Test-Path -LiteralPath $path)) { throw "Required setup file is missing: $path" }
}
if ($Mode -ne 'Local' -and -not (Test-Path -LiteralPath "$RepositoryRoot/.github/scripts/repo/Set-GithubDeploymentEnvironments.ps1")) {
throw 'Required GitHub deployment environment helper is missing.'
}
$short = if ($Environment -eq 'production') { 'prod' } else { 'dev' }
-$setupPrefix = "Setup:${Environment}:${Instance}"
$tools = @{ dotnet = 'Microsoft.DotNet.SDK.10'; git = 'Git.Git' }
if ($Mode -ne 'Local') { $tools.az = 'Microsoft.AzureCLI'; $tools.gh = 'GitHub.cli' }
foreach ($tool in $tools.Keys) {
@@ -70,14 +69,22 @@ if ($Stage -eq 'Check') {
}
. "$RepositoryRoot/.azure/scripts/lib/Dotnet.Common.ps1"
+. "$PSScriptRoot/Setup-Session.ps1"
+Start-SetupSession -RepositoryRoot $RepositoryRoot -CompanyName $CompanyName -ProductName $ProductName -Environment $Environment -Instance $Instance
+if (-not $PSBoundParameters.ContainsKey('SqlAuthentication') -and $setupState['SqlAuthentication']) {
+ $SqlAuthentication = [string]$setupState['SqlAuthentication']
+}
+Save-SetupValue 'SqlAuthentication' $SqlAuthentication
$apiValues = Get-DotnetUserSecrets -ProjectPath $apiProject
function Read-Setting([string]$Name, [string]$Value, [string]$Default = '') {
- if ($Value) { return $Value }
- if ($apiValues["${setupPrefix}:$Name"]) { return [string]$apiValues["${setupPrefix}:$Name"] }
- $answer = Read-Host "$Name$(if ($Default) { " [$Default]" })"
- if (-not $answer) { $answer = $Default }
- if (-not $answer) { throw "$Name is required." }
- return $answer
+ if (-not $Value) { $Value = [string]$setupState[$Name] }
+ if (-not $Value) {
+ $Value = Read-Host "$Name$(if ($Default) { " [$Default]" })"
+ if (-not $Value) { $Value = $Default }
+ }
+ if (-not $Value) { throw "$Name is required." }
+ Save-SetupValue $Name $Value
+ return $Value
}
function Read-PrivateSetting([string]$Name, [hashtable]$Values, [string]$Key) {
if ($Values[$Key]) { return [string]$Values[$Key] }
@@ -99,6 +106,82 @@ function Confirm-SqlAdministratorGroup([string]$ObjectId, [string]$TenantId) {
function Save-Settings([string]$Project, [hashtable]$Values) {
if (-not (Set-DotnetUserSecrets -ProjectPath $Project -Secrets $Values)) { throw 'Setup could not persist configuration. No credentials will be printed.' }
}
+function Invoke-SetupRegistrations {
+ $previousApi = Get-DotnetUserSecrets $apiProject
+ $previous = @{}
+ foreach ($project in @($webProject, $e2eProject) | Where-Object { $_ }) {
+ $previous[$project] = Get-DotnetUserSecrets $project
+ }
+ try {
+ & "$RepositoryRoot/.azure/scripts/New-EntraDotnetSolution.ps1" @registrationArguments | Out-Null
+ }
+ finally {
+ $currentApi = Get-DotnetUserSecrets $apiProject
+ if ($currentApi['EntraExternalId:ClientId'] -and $currentApi['EntraExternalId:ClientId'] -ne $previousApi['EntraExternalId:ClientId']) {
+ Save-SetupValue 'ApiRegistrationChanged' 'true'
+ }
+ if (($currentApi['EntraExternalId:TenantId'] -and $currentApi['EntraExternalId:TenantId'] -ne $previousApi['EntraExternalId:TenantId']) -or
+ ($currentApi['EntraExternalId:Instance'] -and $currentApi['EntraExternalId:Instance'] -ne $previousApi['EntraExternalId:Instance'])) {
+ Save-SetupValue 'SignInConfigurationChanged' 'true'
+ }
+ foreach ($project in $previous.Keys) {
+ $current = Get-DotnetUserSecrets $project
+ $old = $previous[$project]
+ $clientId = [string]$current['EntraExternalId:ClientId']
+ if (-not $clientId) { throw 'Registration did not persist its client ID.' }
+ $kind = if ($project -eq $webProject) { 'Web' } else { 'E2E' }
+ $changed = $clientId -ne $old['EntraExternalId:ClientId'] -or
+ ($old['EntraExternalId:TenantId'] -and $current['EntraExternalId:TenantId'] -ne $old['EntraExternalId:TenantId'])
+ $stale = $changed -and $current['EntraExternalId:ClientSecret'] -and
+ $current['EntraExternalId:ClientSecret'] -ceq $old['EntraExternalId:ClientSecret']
+ $repairKey = "${kind}RepairClientId"
+ if ($stale -or -not $current['EntraExternalId:ClientSecret'] -or $setupState[$repairKey] -eq $clientId) {
+ Save-SetupValue $repairKey $clientId
+ Save-SetupValue "${kind}CredentialsChanged" 'true'
+ $credentialKey = "${kind}Credential:$clientId"
+ $credential = [string]$setupState[$credentialKey]
+ if (-not $credential) {
+ $arguments = @{
+ Type = $kind
+ TenantId = $SignInTenantId
+ AppRegistrationName = $registrationArguments["${kind}AppRegistrationName"]
+ SecretOnly = $true
+ SkipPrerequisites = $true
+ ProjectName = (Get-DotnetProjectName $project)
+ }
+ if ($kind -eq 'E2E') { $arguments.ApiAppId = (Get-DotnetUserSecrets $apiProject)['EntraExternalId:ClientId'] }
+ $result = @(& "$RepositoryRoot/.azure/scripts/entra/New-EntraAppRegistration.ps1" @arguments) |
+ Where-Object { $_ -and $_.PSObject.Properties['AppId'] } | Select-Object -Last 1
+ if (-not $result -or $result.AppId -ne $clientId -or -not $result.Secret) {
+ throw "Unable to generate a credential for the reconciled $kind registration."
+ }
+ $credential = [string]$result.Secret
+ Save-SetupValue $credentialKey $credential
+ }
+ Save-Settings $project @{ 'EntraExternalId:ClientSecret' = $credential }
+ $current['EntraExternalId:ClientSecret'] = $credential
+ Save-SetupValue $repairKey 'none'
+ }
+ if ($changed -or $current['EntraExternalId:ClientSecret'] -cne $old['EntraExternalId:ClientSecret']) {
+ Save-SetupValue "${kind}CredentialsChanged" 'true'
+ }
+ }
+ }
+}
+function Get-GitHubSecretNames([string]$Repository, [string]$TargetEnvironment) {
+ $names = @(gh secret list --repo $Repository --env $TargetEnvironment --json name --jq '.[].name')
+ if ($LASTEXITCODE -ne 0) { throw 'Unable to list existing GitHub environment secrets.' }
+ return $names
+}
+function Publish-SetupSecrets([hashtable]$Values, [string[]]$Existing, [string[]]$Changed) {
+ $pending = @{}
+ foreach ($name in $Values.Keys) {
+ if ($name -notin $Existing -or $name -in $Changed) { $pending[$name] = $Values[$name] }
+ }
+ if ($pending.Count -gt 0) {
+ & "$RepositoryRoot/.github/scripts/repo/New-GithubSecret.ps1" -Owner $GitHubOwner -Repo $GitHubRepository -Environment $Environment -Secrets $pending
+ }
+}
function Get-LocalUrl([string]$Project) {
$launch = Get-Content (Join-Path (Split-Path $Project) 'Properties/launchSettings.json') -Raw | ConvertFrom-Json
$profile = if ($launch.profiles.PSObject.Properties['SelfHost']) { $launch.profiles.SelfHost } else { $launch.profiles.PSObject.Properties.Value | Select-Object -First 1 }
@@ -138,34 +221,14 @@ Push-Location $RepositoryRoot
try {
if ($Stage -eq 'Prepare') {
Write-Host 'Preparing sign-in registrations and local configuration.'
- $previousWebValues = Get-DotnetUserSecrets $webProject
- if ($previousWebValues['EntraExternalId:ClientSecret'] -and -not $previousWebValues['Setup:SecretClientId']) {
- Save-Settings $webProject @{ 'Setup:SecretClientId' = $previousWebValues['EntraExternalId:ClientId'] }
- }
- $previousE2eValues = @{}
- if ($e2eProject) {
- $previousE2eValues = Get-DotnetUserSecrets $e2eProject
- if ($previousE2eValues['EntraExternalId:ClientSecret'] -and -not $previousE2eValues['Setup:SecretClientId']) {
- Save-Settings $e2eProject @{ 'Setup:SecretClientId' = $previousE2eValues['EntraExternalId:ClientId'] }
- }
- }
- & "$RepositoryRoot/.azure/scripts/New-EntraDotnetSolution.ps1" @registrationArguments | Out-Null
+ Invoke-SetupRegistrations
$apiValues = Get-DotnetUserSecrets $apiProject
$webValues = Get-DotnetUserSecrets $webProject
- if ($webValues['Setup:SecretClientId'] -ne $webValues['EntraExternalId:ClientId'] -and $webValues['EntraExternalId:ClientSecret'] -eq $previousWebValues['EntraExternalId:ClientSecret']) {
- $webValues.Remove('EntraExternalId:ClientSecret')
- }
- Save-Settings $webProject @{ 'EntraExternalId:ClientSecret' = (Read-PrivateSetting 'Web client secret (only if missing or for a different registration)' $webValues 'EntraExternalId:ClientSecret'); 'Setup:SecretClientId' = $webValues['EntraExternalId:ClientId'] }
+ Save-Settings $webProject @{ 'EntraExternalId:ClientSecret' = (Read-PrivateSetting 'Web client secret (only if missing or for a different registration)' $webValues 'EntraExternalId:ClientSecret') }
Save-Settings $webProject @{ 'BackendApi:BaseUrl' = $apiUrl }
if ($e2eProject) {
$e2eValues = Get-DotnetUserSecrets $e2eProject
- if ($e2eValues['Setup:SecretClientId'] -ne $e2eValues['EntraExternalId:ClientId'] -and $e2eValues['EntraExternalId:ClientSecret'] -eq $previousE2eValues['EntraExternalId:ClientSecret']) {
- $e2eValues.Remove('EntraExternalId:ClientSecret')
- }
- Save-Settings $e2eProject @{ 'EntraExternalId:ClientSecret' = (Read-PrivateSetting 'E2E client secret (only if missing or for a different registration)' $e2eValues 'EntraExternalId:ClientSecret'); 'Setup:SecretClientId' = $e2eValues['EntraExternalId:ClientId']; 'BackendApi:BaseUrl' = $apiUrl; 'EntraExternalId:ValidateAuthority' = 'true' }
- foreach ($project in Get-ChildItem "$RepositoryRoot/src/Setup.*/Setup.*.csproj" -ErrorAction SilentlyContinue) {
- Save-Settings $project.FullName (Get-DotnetUserSecrets $e2eProject)
- }
+ Save-Settings $e2eProject @{ 'EntraExternalId:ClientSecret' = (Read-PrivateSetting 'E2E client secret (only if missing or for a different registration)' $e2eValues 'EntraExternalId:ClientSecret'); 'BackendApi:BaseUrl' = $apiUrl; 'EntraExternalId:ValidateAuthority' = 'true' }
}
$AzureOpenAIEndpoint = Read-Setting 'AzureOpenAIEndpoint' $AzureOpenAIEndpoint $apiValues['AzureOpenAI:Endpoint']
Save-Settings $apiProject @{ 'AzureOpenAI:Endpoint' = $AzureOpenAIEndpoint; 'AzureOpenAI:ApiKey' = (Read-PrivateSetting 'Azure OpenAI API key' $apiValues 'AzureOpenAI:ApiKey') }
@@ -203,6 +266,7 @@ try {
}
if ($Mode -eq 'Local') {
if ($Stage -ne 'Prepare') { throw 'Local mode uses Prepare or Check, not Complete.' }
+ Complete-SetupSession
Write-Host "Local setup complete. API: $apiUrl; Web: $webUrl."
return
}
@@ -212,10 +276,10 @@ try {
$GitHubOwner = Read-Setting 'GitHubOwner' $GitHubOwner
$GitHubRepository = Read-Setting 'GitHubRepository' $GitHubRepository $product
if (-not $GitHubPrincipalName) {
- $GitHubPrincipalName = if ($apiValues["${setupPrefix}:GitHubPrincipalName"]) { [string]$apiValues["${setupPrefix}:GitHubPrincipalName"] } else { "github-$product" }
+ $GitHubPrincipalName = if ($setupState['GitHubPrincipalName']) { [string]$setupState['GitHubPrincipalName'] } else { "github-$product" }
}
+ Save-SetupValue 'GitHubPrincipalName' $GitHubPrincipalName
$ResourceGroupName = Read-Setting 'ResourceGroupName' $ResourceGroupName "$product-$short-wus2-$Instance-rg"
- Save-Settings $apiProject @{ "${setupPrefix}:SignInTenantId" = $SignInTenantId; "${setupPrefix}:SignInInstanceUrl" = $SignInInstanceUrl; "${setupPrefix}:WorkloadTenantId" = $WorkloadTenantId; "${setupPrefix}:SubscriptionId" = $SubscriptionId; "${setupPrefix}:GitHubOwner" = $GitHubOwner; "${setupPrefix}:GitHubRepository" = $GitHubRepository; "${setupPrefix}:GitHubPrincipalName" = $GitHubPrincipalName; "${setupPrefix}:ResourceGroupName" = $ResourceGroupName }
gh auth status | Out-Null
if ($LASTEXITCODE -ne 0) { gh auth login; if ($LASTEXITCODE -ne 0) { throw 'GitHub authentication failed.' } }
$repository = "$GitHubOwner/$GitHubRepository"
@@ -230,6 +294,7 @@ try {
& "$RepositoryRoot/.github/scripts/repo/Set-GithubDeploymentEnvironments.ps1" -Owner $GitHubOwner -Repo $GitHubRepository
$federation = @(& "$RepositoryRoot/.github/scripts/cd/New-Github-Azure-Federation.ps1" -TenantId $WorkloadTenantId -SubscriptionId $SubscriptionId -PrincipalName $GitHubPrincipalName -Organization $GitHubOwner -Repository $GitHubRepository -Environment $Environment -PassThru) | Where-Object { $_ -and $_.PSObject.Properties['ClientId'] } | Select-Object -Last 1
if (-not $federation) { throw 'Federation setup did not return its structured client ID.' }
+ $existingSecrets = @(Get-GitHubSecretNames $repository $Environment)
$apiValues = Get-DotnetUserSecrets $apiProject
$webValues = Get-DotnetUserSecrets $webProject
$secrets = @{
@@ -244,17 +309,35 @@ try {
$secrets.E2E_CLIENT_ID = $e2eValues['EntraExternalId:ClientId']; $secrets.E2E_CLIENT_SECRET = $e2eValues['EntraExternalId:ClientSecret']
}
if ($SqlAuthentication -eq 'SqlAuth') {
- foreach ($name in @('SQL_ADMIN_USER', 'SQL_MIGRATION_USER')) { $secrets[$name] = Read-Setting $name '' }
- foreach ($name in @('SQL_ADMIN_PASSWORD', 'SQL_MIGRATION_PASSWORD')) { $secrets[$name] = Read-PrivateSetting $name $apiValues "${setupPrefix}:$name" }
- Save-Settings $apiProject @{ "${setupPrefix}:SQL_ADMIN_USER" = $secrets.SQL_ADMIN_USER; "${setupPrefix}:SQL_MIGRATION_USER" = $secrets.SQL_MIGRATION_USER; "${setupPrefix}:SQL_ADMIN_PASSWORD" = $secrets.SQL_ADMIN_PASSWORD; "${setupPrefix}:SQL_MIGRATION_PASSWORD" = $secrets.SQL_MIGRATION_PASSWORD }
+ foreach ($name in @('SQL_ADMIN_USER', 'SQL_MIGRATION_USER')) {
+ if ($name -notin $existingSecrets) { $secrets[$name] = Read-Setting $name '' }
+ }
+ foreach ($name in @('SQL_ADMIN_PASSWORD', 'SQL_MIGRATION_PASSWORD')) {
+ if ($name -notin $existingSecrets) {
+ $secrets[$name] = Read-PrivateSetting $name $setupState $name
+ Save-SetupValue $name $secrets[$name]
+ }
+ }
}
else {
- $groupObjectId = Read-Setting 'SqlAdministratorGroupObjectId' $SqlAdministratorGroupObjectId
- Confirm-SqlAdministratorGroup -ObjectId $groupObjectId -TenantId $WorkloadTenantId
- $secrets.SQL_ENTRA_ADMIN_GROUP_OBJECT_ID = $groupObjectId
+ if ('SQL_ENTRA_ADMIN_GROUP_OBJECT_ID' -notin $existingSecrets -or $SqlAdministratorGroupObjectId) {
+ $groupObjectId = Read-Setting 'SqlAdministratorGroupObjectId' $SqlAdministratorGroupObjectId
+ Confirm-SqlAdministratorGroup -ObjectId $groupObjectId -TenantId $WorkloadTenantId
+ $secrets.SQL_ENTRA_ADMIN_GROUP_OBJECT_ID = $groupObjectId
+ }
}
- & "$RepositoryRoot/.github/scripts/repo/New-GithubSecret.ps1" -Owner $GitHubOwner -Repo $GitHubRepository -Environment $Environment -Secrets $secrets
- if ($LASTEXITCODE -ne 0) { throw 'GitHub secret preparation did not complete successfully. Fix access and rerun Prepare.' }
+ $changed = @()
+ if ($setupState['WebCredentialsChanged'] -eq 'true') { $changed += @('WEB_CLIENT_ID', 'WEB_CLIENT_SECRET') }
+ if ($setupState['E2ECredentialsChanged'] -eq 'true') { $changed += @('E2E_CLIENT_ID', 'E2E_CLIENT_SECRET') }
+ if ($setupState['ApiRegistrationChanged'] -eq 'true') { $changed += 'API_CLIENT_ID' }
+ if ($setupState['SignInConfigurationChanged'] -eq 'true') { $changed += @('EEID_INSTANCE', 'EEID_TENANT_ID') }
+ if ($SqlAdministratorGroupObjectId) { $changed += 'SQL_ENTRA_ADMIN_GROUP_OBJECT_ID' }
+ if ($PSBoundParameters.ContainsKey('SqlAuthentication')) { $changed += 'SQL_SERVER_AUTHENTICATION' }
+ Publish-SetupSecrets $secrets $existingSecrets $changed
+ Save-SetupValue 'WebCredentialsChanged' 'false'
+ if ($e2eProject) { Save-SetupValue 'E2ECredentialsChanged' 'false' }
+ Save-SetupValue 'ApiRegistrationChanged' 'false'
+ Save-SetupValue 'SignInConfigurationChanged' 'false'
Write-Host "Preparation complete. Review $product-iac.yml naming, parameter-file authentication and shared dependencies; run that workflow with environment=$Environment and runcd=true."
Write-Host "After IaC succeeds, run: ./Initialize-Installation.ps1 -Mode Cloud -Stage Complete -Environment $Environment -Instance $Instance"
return
@@ -275,9 +358,35 @@ try {
$registrationArguments.WebLogoutUri = "$($targets.webEndpoint.TrimEnd('/'))/signout-callback-oidc"
$registrationArguments.GenerateSecrets = $false
$registrationArguments.RotateSecrets = $false
- & "$RepositoryRoot/.azure/scripts/New-EntraDotnetSolution.ps1" @registrationArguments | Out-Null
+ Invoke-SetupRegistrations
+ foreach ($project in @($webProject, $e2eProject) | Where-Object { $_ }) {
+ $values = Get-DotnetUserSecrets $project
+ Save-Settings $project @{ 'EntraExternalId:ClientSecret' = (Read-PrivateSetting 'Client secret (only if missing or for a different registration)' $values 'EntraExternalId:ClientSecret') }
+ }
Save-Settings $webProject @{ 'BackendApi:BaseUrl' = $apiUrl }
if ($e2eProject) { Save-Settings $e2eProject @{ 'BackendApi:BaseUrl' = $apiUrl } }
+ $changedSecrets = @{}
+ if ($setupState['WebCredentialsChanged'] -eq 'true') {
+ $webValues = Get-DotnetUserSecrets $webProject
+ $changedSecrets.WEB_CLIENT_ID = $webValues['EntraExternalId:ClientId']
+ $changedSecrets.WEB_CLIENT_SECRET = $webValues['EntraExternalId:ClientSecret']
+ }
+ if ($e2eProject -and $setupState['E2ECredentialsChanged'] -eq 'true') {
+ $e2eValues = Get-DotnetUserSecrets $e2eProject
+ $changedSecrets.E2E_CLIENT_ID = $e2eValues['EntraExternalId:ClientId']
+ $changedSecrets.E2E_CLIENT_SECRET = $e2eValues['EntraExternalId:ClientSecret']
+ }
+ if ($setupState['ApiRegistrationChanged'] -eq 'true') {
+ $apiValues = Get-DotnetUserSecrets $apiProject
+ $changedSecrets.API_CLIENT_ID = $apiValues['EntraExternalId:ClientId']
+ }
+ if ($setupState['SignInConfigurationChanged'] -eq 'true') {
+ $changedSecrets.EEID_INSTANCE = $SignInInstanceUrl
+ $changedSecrets.EEID_TENANT_ID = $SignInTenantId
+ }
+ if ($changedSecrets.Count -gt 0) {
+ Publish-SetupSecrets $changedSecrets @() @($changedSecrets.Keys)
+ }
if ($targets.sqlServerKind -eq 'EntraOnly') {
$apiValues = Get-DotnetUserSecrets $apiProject
$appsJson = az ad app list --display-name $GitHubPrincipalName --output json
@@ -289,6 +398,7 @@ try {
Write-Host 'Provisioning Entra SQL access with the signed-in workload identity. That identity must be in the configured SQL administrator group.'
& "$RepositoryRoot/.azure/scripts/sql/Set-AzureSqlManagedIdentityUsers.ps1" -ServerHost $targets.sqlServerHost -DatabaseName $targets.sqlDatabaseName -RuntimeName $targets.apiAppName -RuntimeClientId $targets.apiManagedIdentityClientId -MigrationName "github-$product-$short-$Instance" -MigrationClientId $migrationClientId
}
+ Complete-SetupSession
Write-Host "IaC verified and hosted redirects reconciled. Run $product-app.yml with environment=$Environment and runcd=true. SQL-auth users are provisioned automatically by the pipelines."
}
finally { Pop-Location }
\ No newline at end of file
diff --git a/.github/scripts/setup/Setup-Session.ps1 b/.github/scripts/setup/Setup-Session.ps1
new file mode 100644
index 0000000..25985c0
--- /dev/null
+++ b/.github/scripts/setup/Setup-Session.ps1
@@ -0,0 +1,57 @@
+function Read-SetupStore {
+ $root = if ($IsWindows) {
+ Join-Path ([Environment]::GetFolderPath('ApplicationData')) 'Microsoft/UserSecrets'
+ }
+ else {
+ Join-Path $HOME '.microsoft/usersecrets'
+ }
+ $path = Join-Path (Join-Path $root $script:setupStoreId) 'secrets.json'
+ if (-not (Test-Path -LiteralPath $path)) { return @{} }
+ return Get-Content -LiteralPath $path -Raw | ConvertFrom-Json -AsHashtable
+}
+
+function Write-SetupStore([hashtable]$Values) {
+ $Values | ConvertTo-Json -Compress -Depth 10 | dotnet user-secrets set --id $script:setupStoreId | Out-Null
+ if ($LASTEXITCODE -ne 0) { throw 'Unable to save setup state. Values were not printed.' }
+}
+
+function Start-SetupSession([string]$RepositoryRoot, [string]$CompanyName, [string]$ProductName, [string]$Environment, [string]$Instance) {
+ $identity = "$RepositoryRoot|$CompanyName|$ProductName|$Environment|$Instance"
+ if ($IsWindows) { $identity = $identity.ToLowerInvariant() }
+ $hash = [Convert]::ToHexString([System.Security.Cryptography.SHA256]::HashData([System.Text.Encoding]::UTF8.GetBytes($identity))).ToLowerInvariant()
+ $script:setupStoreId = "product-setup-$hash"
+ $stored = Read-SetupStore
+ $active = [string]$stored['ActiveSession']
+ if ($active -and $active -notmatch '^[0-9a-f]{32}$') { throw 'The setup session identifier is invalid.' }
+ if (-not $active) {
+ $active = [guid]::NewGuid().ToString('N')
+ Write-SetupStore @{ 'ActiveSession' = $active }
+ }
+ $script:setupSessionId = $active
+ $script:setupState = @{}
+ $prefix = "Session:${active}:"
+ foreach ($key in $stored.Keys) {
+ if ($key.StartsWith($prefix, [StringComparison]::OrdinalIgnoreCase)) {
+ $script:setupState[$key.Substring($prefix.Length)] = $stored[$key]
+ }
+ }
+}
+
+function Save-SetupValue([string]$Name, [string]$Value) {
+ if ([string]::IsNullOrWhiteSpace($Value)) { throw "$Name cannot be empty." }
+ if ($script:setupState[$Name] -ceq $Value) { return }
+ Write-SetupStore @{ "Session:$($script:setupSessionId):$Name" = $Value }
+ $script:setupState[$Name] = $Value
+}
+
+function Complete-SetupSession {
+ $stored = Read-SetupStore
+ if ($stored['ActiveSession'] -cne $script:setupSessionId) { throw 'The active setup session changed; no setup state was removed.' }
+ $prefix = "Session:$($script:setupSessionId):"
+ foreach ($key in @($stored.Keys | Where-Object { $_.StartsWith($prefix, [StringComparison]::OrdinalIgnoreCase) })) {
+ dotnet user-secrets remove $key --id $script:setupStoreId | Out-Null
+ if ($LASTEXITCODE -ne 0) { throw 'Unable to clean this setup session. Remaining state was preserved for retry.' }
+ }
+ dotnet user-secrets remove 'ActiveSession' --id $script:setupStoreId | Out-Null
+ if ($LASTEXITCODE -ne 0) { throw 'Unable to complete setup session cleanup.' }
+}
diff --git a/.github/scripts/tests/SetupLifecycle.Tests.ps1 b/.github/scripts/tests/SetupLifecycle.Tests.ps1
new file mode 100644
index 0000000..f0c80ee
--- /dev/null
+++ b/.github/scripts/tests/SetupLifecycle.Tests.ps1
@@ -0,0 +1,65 @@
+Describe 'Cloud setup session lifecycle' {
+ It 'resumes Prepare through Complete without prompting or touching older application entries' {
+ $initializer = Join-Path $PSScriptRoot '..\setup\Initialize-Product.ps1'
+ $root = Join-Path $TestDrive ([guid]::NewGuid().ToString('N'))
+ foreach ($directory in @('src/Presentation.Api/Properties', 'src/Presentation.Web/Properties', '.azure/scripts/lib', '.github/scripts/cd', '.github/scripts/repo')) {
+ New-Item -ItemType Directory -Force (Join-Path $root $directory) | Out-Null
+ }
+ foreach ($file in @('Contoso.Product.slnx', 'src/Presentation.Api/Presentation.Api.csproj', 'src/Presentation.Web/Presentation.Web.csproj')) {
+ Set-Content (Join-Path $root $file) 'synthetic fixture'
+ }
+ $launch = '{"profiles":{"SelfHost":{"applicationUrl":"https://localhost:7443"}}}'
+ Set-Content (Join-Path $root 'src/Presentation.Api/Properties/launchSettings.json') $launch
+ Set-Content (Join-Path $root 'src/Presentation.Web/Properties/launchSettings.json') $launch
+ Set-Content (Join-Path $root '.azure/scripts/lib/Dotnet.Common.ps1') @'
+function Get-DotnetUserSecrets { param($ProjectPath) return $global:SetupLifecycleStores[$ProjectPath].Clone() }
+function Set-DotnetUserSecrets { param($ProjectPath, $Secrets) foreach ($key in $Secrets.Keys) { $global:SetupLifecycleStores[$ProjectPath][$key] = $Secrets[$key] }; return $true }
+function Get-DotnetProjectName { param($ProjectPath) return 'synthetic' }
+'@
+ Set-Content (Join-Path $root '.azure/scripts/New-EntraDotnetSolution.ps1') ''
+ Set-Content (Join-Path $root '.github/scripts/repo/Set-GithubDeploymentEnvironments.ps1') ''
+ Set-Content (Join-Path $root '.github/scripts/repo/New-GithubSecret.ps1') 'throw "No existing secret should be uploaded."'
+ Set-Content (Join-Path $root '.github/scripts/cd/New-Github-Azure-Federation.ps1') '[pscustomobject]@{ ClientId = "synthetic-federation" }'
+ Set-Content (Join-Path $root '.github/scripts/cd/Get-WorkloadDeployment.ps1') @'
+[pscustomobject]@{ apiEndpoint = 'https://api.example.test'; webEndpoint = 'https://web.example.test'; applicationInsightsResourceId = $null; sqlServerKind = 'SqlAuth' }
+'@
+ $api = "$root/src/Presentation.Api/Presentation.Api.csproj"
+ $web = "$root/src/Presentation.Web/Presentation.Web.csproj"
+ $global:SetupLifecycleStores = @{
+ $api = @{ 'EntraExternalId:ClientId' = 'synthetic-api'; 'EntraExternalId:TenantId' = '11111111-1111-1111-1111-111111111111'; 'EntraExternalId:Instance' = 'https://signin.example.test'; 'AzureOpenAI:Endpoint' = 'https://ai.example.test'; 'AzureOpenAI:ApiKey' = 'synthetic-ai'; 'Setup:development:101:WorkloadTenantId' = 'legacy-value' }
+ $web = @{ 'EntraExternalId:ClientId' = 'synthetic-web'; 'EntraExternalId:ClientSecret' = 'synthetic-web-secret' }
+ }
+ function gh { }
+ function az { }
+ Mock gh {
+ $global:LASTEXITCODE = 0
+ if ($args[0] -eq 'secret' -and $args[1] -eq 'list') {
+ return @('AZURE_CLIENT_ID', 'AZURE_TENANT_ID', 'AZURE_SUBSCRIPTION_ID', 'EEID_INSTANCE', 'EEID_TENANT_ID', 'API_CLIENT_ID', 'WEB_CLIENT_ID', 'WEB_CLIENT_SECRET', 'AZURE_OPENAI_ENDPOINT', 'AZURE_OPENAI_APIKEY', 'SQL_SERVER_AUTHENTICATION', 'SQL_ENTRA_ADMIN_GROUP_OBJECT_ID')
+ }
+ }
+ Mock az { $global:LASTEXITCODE = 0 }
+ Mock Read-Host { throw 'Resume must not prompt.' }
+ Mock Get-Command { [pscustomobject]@{ Name = 'Available' } } -ParameterFilter { ($Name -join ',') -in @('dotnet', 'git', 'az', 'gh') }
+ $identity = "$root|Contoso|Product|development|101"
+ if ($IsWindows) { $identity = $identity.ToLowerInvariant() }
+ $hash = [Convert]::ToHexString([System.Security.Cryptography.SHA256]::HashData([Text.Encoding]::UTF8.GetBytes($identity))).ToLowerInvariant()
+ $base = if ($IsWindows) { Join-Path ([Environment]::GetFolderPath('ApplicationData')) 'Microsoft/UserSecrets' } else { Join-Path $HOME '.microsoft/usersecrets' }
+ $folder = Join-Path $base "product-setup-$hash"
+ $file = Join-Path $folder 'secrets.json'
+ try {
+ & $initializer -RepositoryRoot $root -CompanyName Contoso -ProductName Product -Mode Cloud -Stage Prepare -Environment development -Instance 101 -SignInTenantId '11111111-1111-1111-1111-111111111111' -SignInInstanceUrl 'https://signin.example.test' -WorkloadTenantId 'synthetic-workload' -SubscriptionId 'synthetic-subscription' -GitHubOwner 'synthetic-owner' -GitHubRepository 'synthetic-repo' -ResourceGroupName 'synthetic-group' -AzureOpenAIEndpoint 'https://ai.example.test'
+ $saved = Get-Content -LiteralPath $file -Raw | ConvertFrom-Json -AsHashtable
+ $saved.ContainsKey('ActiveSession') | Should -BeTrue
+ & $initializer -RepositoryRoot $root -CompanyName Contoso -ProductName Product -Mode Cloud -Stage Complete -Environment development -Instance 101
+ $remaining = Get-Content -LiteralPath $file -Raw | ConvertFrom-Json -AsHashtable
+ $remaining.Count | Should -Be 0
+ $global:SetupLifecycleStores[$api]['Setup:development:101:WorkloadTenantId'] | Should -Be 'legacy-value'
+ Should -Invoke Read-Host -Times 0 -Exactly
+ }
+ finally {
+ if (Test-Path -LiteralPath $file) { Remove-Item -LiteralPath $file }
+ if (Test-Path -LiteralPath $folder) { Remove-Item -LiteralPath $folder }
+ Remove-Variable -Name SetupLifecycleStores -Scope Global
+ }
+ }
+}
diff --git a/.github/scripts/tests/SetupSession.Tests.ps1 b/.github/scripts/tests/SetupSession.Tests.ps1
new file mode 100644
index 0000000..3f159dc
--- /dev/null
+++ b/.github/scripts/tests/SetupSession.Tests.ps1
@@ -0,0 +1,52 @@
+BeforeAll {
+ . (Join-Path $PSScriptRoot '..\setup\Setup-Session.ps1')
+}
+
+Describe 'Setup session' {
+ BeforeEach {
+ $script:fixtureStore = @{ 'Unrelated:Legacy' = 'synthetic-legacy' }
+ Mock Read-SetupStore { return $script:fixtureStore.Clone() }
+ Mock Write-SetupStore {
+ param($Values)
+ foreach ($key in $Values.Keys) { $script:fixtureStore[$key] = $Values[$key] }
+ }
+ Mock dotnet {
+ if ($args[0] -ne 'user-secrets' -or $args[1] -ne 'remove') { throw 'Unexpected secret-store operation.' }
+ [void]$script:fixtureStore.Remove([string]$args[2])
+ $global:LASTEXITCODE = 0
+ }
+ }
+
+ It 'resumes a failed or paused setup and removes only its own session entries on completion' {
+ Start-SetupSession 'synthetic-root' 'Contoso' 'Product' 'development' '101'
+ $session = $script:setupSessionId
+ Save-SetupValue 'WorkloadTenantId' 'synthetic-tenant'
+ Save-SetupValue 'Credential:synthetic-id' 'synthetic-secret'
+
+ Start-SetupSession 'synthetic-root' 'Contoso' 'Product' 'development' '101'
+ $script:setupSessionId | Should -Be $session
+ $script:setupState['WorkloadTenantId'] | Should -Be 'synthetic-tenant'
+ $script:setupState['Credential:synthetic-id'] | Should -Be 'synthetic-secret'
+
+ Complete-SetupSession
+ $script:fixtureStore.Count | Should -Be 1
+ $script:fixtureStore['Unrelated:Legacy'] | Should -Be 'synthetic-legacy'
+ Should -Invoke dotnet -Times 3 -Exactly
+ }
+
+ It 'does not remove state belonging to a different active session' {
+ Start-SetupSession 'synthetic-root' 'Contoso' 'Product' 'development' '101'
+ Save-SetupValue 'WorkloadTenantId' 'synthetic-tenant'
+ $script:fixtureStore['ActiveSession'] = [guid]::NewGuid().ToString('N')
+ { Complete-SetupSession } | Should -Throw '*active setup session changed*'
+ Should -Invoke dotnet -Times 0 -Exactly
+ }
+
+ It 'preserves retry state when saving fails' {
+ Start-SetupSession 'synthetic-root' 'Contoso' 'Product' 'development' '101'
+ Mock Write-SetupStore { throw 'synthetic storage failure' }
+ { Save-SetupValue 'WorkloadTenantId' 'synthetic-tenant' } | Should -Throw '*synthetic storage failure*'
+ $script:fixtureStore['ActiveSession'] | Should -Be $script:setupSessionId
+ Should -Invoke dotnet -Times 0 -Exactly
+ }
+}
diff --git a/.github/scripts/tests/WorkloadDeployment.Tests.ps1 b/.github/scripts/tests/WorkloadDeployment.Tests.ps1
index ab7769d..7624c4b 100644
--- a/.github/scripts/tests/WorkloadDeployment.Tests.ps1
+++ b/.github/scripts/tests/WorkloadDeployment.Tests.ps1
@@ -481,10 +481,113 @@ Describe 'Root setup orchestration' {
{ Confirm-SqlAdministratorGroup -ObjectId '11111111-1111-1111-1111-111111111111' -TenantId 'tenant' } | Should -Throw '*Sign in to workload tenant*'
}
- It 'verifies deployment before SQL provisioning and scopes state per environment and instance' {
+ It 'resumes setup inputs from its own session instead of old API state' {
+ $ast = [System.Management.Automation.Language.Parser]::ParseFile($initializer, [ref]$null, [ref]$null)
+ $definition = $ast.Find({ param($node) $node -is [System.Management.Automation.Language.FunctionDefinitionAst] -and $node.Name -eq 'Read-Setting' }, $true)
+ Invoke-Expression $definition.Extent.Text
+ $apiValues = @{ 'Setup:development:001:WorkloadTenantId' = 'old-tenant' }
+ $setupState = @{ WorkloadTenantId = 'session-tenant' }
+ function Save-SetupValue { param($Name, $Value) }
+ Mock Read-Host { 'new-tenant' }
+ Read-Setting 'WorkloadTenantId' '' | Should -Be 'session-tenant'
+ Read-Setting 'WorkloadTenantId' 'provided-tenant' | Should -Be 'provided-tenant'
+ $setupState.Clear()
+ Read-Setting 'WorkloadTenantId' '' | Should -Be 'new-tenant'
+ Should -Invoke Read-Host -Times 1 -Exactly
+ }
+
+ It 'repairs a changed registration and reuses a generated credential after a failed write' {
+ $ast = [System.Management.Automation.Language.Parser]::ParseFile($initializer, [ref]$null, [ref]$null)
+ $definition = $ast.Find({ param($node) $node -is [System.Management.Automation.Language.FunctionDefinitionAst] -and $node.Name -eq 'Invoke-SetupRegistrations' }, $true)
+ Invoke-Expression $definition.Extent.Text
+ $RepositoryRoot = $setupRoot
+ $apiProject = 'api'
+ $webProject = 'web'
+ $e2eProject = ''
+ $SignInTenantId = 'synthetic-tenant'
+ $registrationArguments = @{ WebAppRegistrationName = 'synthetic-web' }
+ $script:setupState = @{}
+ $global:SetupTestStores = @{
+ api = @{ 'EntraExternalId:ClientId' = 'synthetic-api' }
+ web = @{ 'EntraExternalId:ClientId' = 'old-id'; 'EntraExternalId:ClientSecret' = 'synthetic-old' }
+ }
+ $global:SetupTestGenerated = 0
+ $global:SetupTestWriteFails = $true
+ New-Item -ItemType Directory -Force (Join-Path $setupRoot '.azure/scripts/entra') | Out-Null
+ Set-Content (Join-Path $setupRoot '.azure/scripts/New-EntraDotnetSolution.ps1') '$global:SetupTestStores.web["EntraExternalId:ClientId"] = "new-id"'
+ Set-Content (Join-Path $setupRoot '.azure/scripts/entra/New-EntraAppRegistration.ps1') @'
+param($Type, $TenantId, $AppRegistrationName, $SecretOnly, $SkipPrerequisites, $ProjectName)
+$global:SetupTestGenerated++
+[pscustomobject]@{ AppId = 'new-id'; Secret = 'synthetic-new' }
+'@
+ function Get-DotnetUserSecrets { param($ProjectPath) return $global:SetupTestStores[$ProjectPath].Clone() }
+ function Get-DotnetProjectName { param($ProjectPath) return $ProjectPath }
+ function Save-SetupValue { param($Name, $Value) $script:setupState[$Name] = $Value }
+ function Save-Settings {
+ param($Project, $Values)
+ if ($global:SetupTestWriteFails) { throw 'synthetic write failure' }
+ foreach ($key in $Values.Keys) { $global:SetupTestStores[$Project][$key] = $Values[$key] }
+ }
+ try {
+ { Invoke-SetupRegistrations } | Should -Throw '*synthetic write failure*'
+ $global:SetupTestStores.web['EntraExternalId:ClientSecret'] | Should -Be 'synthetic-old'
+ $script:setupState['WebRepairClientId'] | Should -Be 'new-id'
+ $global:SetupTestWriteFails = $false
+ { Invoke-SetupRegistrations } | Should -Not -Throw
+ $global:SetupTestStores.web['EntraExternalId:ClientSecret'] | Should -Be 'synthetic-new'
+ $script:setupState['WebCredentialsChanged'] | Should -Be 'true'
+ $global:SetupTestGenerated | Should -Be 1
+ { Invoke-SetupRegistrations } | Should -Not -Throw
+ $global:SetupTestGenerated | Should -Be 1
+
+ $script:setupState.Clear()
+ $global:SetupTestStores.api['EntraExternalId:TenantId'] = 'old-tenant'
+ $global:SetupTestStores.web['EntraExternalId:TenantId'] = 'old-tenant'
+ $global:SetupTestStores.web['EntraExternalId:ClientSecret'] = 'synthetic-old'
+ Set-Content (Join-Path $setupRoot '.azure/scripts/New-EntraDotnetSolution.ps1') '$global:SetupTestStores.api["EntraExternalId:TenantId"] = "new-tenant"; $global:SetupTestStores.web["EntraExternalId:TenantId"] = "new-tenant"'
+ { Invoke-SetupRegistrations } | Should -Not -Throw
+ $global:SetupTestStores.web['EntraExternalId:ClientSecret'] | Should -Be 'synthetic-new'
+ $script:setupState['WebCredentialsChanged'] | Should -Be 'true'
+ $script:setupState['SignInConfigurationChanged'] | Should -Be 'true'
+ $global:SetupTestGenerated | Should -Be 2
+ { Invoke-SetupRegistrations } | Should -Not -Throw
+ $global:SetupTestGenerated | Should -Be 2
+ }
+ finally {
+ Remove-Variable -Name SetupTestStores, SetupTestGenerated, SetupTestWriteFails -Scope Global
+ }
+ }
+
+ It 'uploads only missing secrets and credentials affected by registration changes' {
+ $ast = [System.Management.Automation.Language.Parser]::ParseFile($initializer, [ref]$null, [ref]$null)
+ $definition = $ast.Find({ param($node) $node -is [System.Management.Automation.Language.FunctionDefinitionAst] -and $node.Name -eq 'Publish-SetupSecrets' }, $true)
+ Invoke-Expression $definition.Extent.Text
+ $RepositoryRoot = $setupRoot
+ $GitHubOwner = 'synthetic-owner'
+ $GitHubRepository = 'synthetic-repo'
+ $Environment = 'development'
+ $global:SetupTestUpload = @{}
+ Set-Content (Join-Path $setupRoot '.github/scripts/repo/New-GithubSecret.ps1') @'
+param($Owner, $Repo, $Environment, $Secrets)
+$global:SetupTestUpload = $Secrets
+'@
+ try {
+ $values = @{ EXISTING = 'synthetic-existing'; CHANGED = 'synthetic-updated'; MISSING = 'synthetic-new' }
+ Publish-SetupSecrets $values @('EXISTING', 'CHANGED') @('CHANGED')
+ @($global:SetupTestUpload.Keys | Sort-Object) | Should -Be @('CHANGED', 'MISSING')
+ $global:SetupTestUpload = @{}
+ Publish-SetupSecrets @{ EXISTING = 'synthetic-existing' } @('EXISTING') @()
+ $global:SetupTestUpload.Count | Should -Be 0
+ }
+ finally {
+ Remove-Variable -Name SetupTestUpload -Scope Global
+ }
+ }
+
+ It 'verifies deployment before SQL provisioning without persisting setup state in application stores' {
$source = Get-Content $initializer -Raw
$source.IndexOf('Get-WorkloadDeployment.ps1') | Should -BeLessThan $source.IndexOf('Set-AzureSqlManagedIdentityUsers.ps1')
- $source | Should -Match 'Setup:\$\{Environment\}:\$\{Instance\}'
+ $source | Should -Not -Match 'Setup:\$\{Environment\}:\$\{Instance\}|Setup:SecretClientId'
$source | Should -Match 'Set-GithubDeploymentEnvironments.ps1'
$source | Should -Not -Match 'git (commit|push)|Remove-AzSql|DROP DATABASE'
}
@@ -492,8 +595,7 @@ Describe 'Root setup orchestration' {
It 'uses one configurable deployment identity across environments' {
$source = Get-Content $initializer -Raw
$source | Should -Match '\[string\]\$GitHubPrincipalName'
- $source | Should -Match 'else \{ "github-\$product" \}'
- $source | Should -Match '"\$\{setupPrefix\}:GitHubPrincipalName" = \$GitHubPrincipalName'
+ $source | Should -Match '\$setupState\[''GitHubPrincipalName''\]'
$source | Should -Match '-PrincipalName \$GitHubPrincipalName'
$source | Should -Match 'az ad app list --display-name \$GitHubPrincipalName'
}
diff --git a/README.md b/README.md
index 143aece..299b10e 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ Then run `agentstart-app.yml` with `runcd=true`. Entra-only SQL uses
`-SqlAuthentication EntraOnly`; resume as a member of its SQL administrator group.
Rerun the same commands for an existing installation. `-Mode Both` prepares local and cloud;
`-Environment production` selects production when its workflow/parameters are enabled;
-`-Stage Check` is read-only. Missing secrets are prompted privately, never silently rotated.
+`-Stage Check` is read-only. Missing registration credentials are added without revoking existing ones.
No commits, pushes, database resets, or authentication-mode conversions occur.
See [First-time setup](docs/first-time-setup.md) for phases and troubleshooting.
diff --git a/docs/first-time-setup.md b/docs/first-time-setup.md
index 61fea2a..f411dff 100644
--- a/docs/first-time-setup.md
+++ b/docs/first-time-setup.md
@@ -41,15 +41,23 @@ Pass `-SignInTenantId`, `-SignInInstanceUrl`, `-WorkloadTenantId`, `-Subscriptio
parameter files and workflow planning to be enabled first; this script does not invent them.
GitHub federation defaults to one `github-agentstart` application shared across environments. Pass
-`-GitHubPrincipalName` to reuse a differently named application; Prepare stores that name for
+`-GitHubPrincipalName` to reuse a differently named application; it is retained for
Complete. Existing matching issuer, subject, and audience credentials are reused, including
main and pull request subjects, and unrelated credentials are not deleted. Each environment
still needs its own GitHub environment and deployment permissions in its subscription.
-Existing registrations/secrets are reused. On a new machine, privately enter missing existing
-client secrets; automatic retrieval from Entra/GitHub is impossible. `-RotateSecrets` is explicit
-and requires updating all consumers. State stays in local user-secrets per environment/instance;
-user-secrets are not encrypted storage and must not be committed, printed or exported.
+Existing registrations and available credentials are reused. Entra/GitHub cannot reveal old
+credentials, so setup creates an additional credential when a local one is missing. `-RotateSecrets`
+explicitly adds replacements. A dedicated setup user-secrets store retains session state
+across Prepare and Complete and on failure; successful Local Prepare or Cloud Complete removes
+only that session's entries. Runtime credentials stay in their owning project stores. User-secrets
+are not encrypted and must not be committed, printed or exported. Existing `Setup:*` entries in
+application stores are not automatically removed; review them manually, never clear the entire
+store. Missing or mismatched registration credentials are repaired without deleting old
+credentials; affected GitHub secrets are updated and unrelated existing values are preserved.
+
+The API, Web, and integration test projects now have secret stores distinct from Crucible.
+Reconfigure each project using its own store; the previous shared stores are left unchanged.
For Entra-only, select `-SqlAuthentication EntraOnly`, configure an existing workload SQL administrator
group, and resume as a group member. Prepare validates that the group exists in the workload tenant
diff --git a/src/Presentation.Api/Presentation.Api.csproj b/src/Presentation.Api/Presentation.Api.csproj
index 79962ca..2436fb3 100644
--- a/src/Presentation.Api/Presentation.Api.csproj
+++ b/src/Presentation.Api/Presentation.Api.csproj
@@ -8,7 +8,7 @@
enable
True
README.md
- bf5b92ab-f3fe-4af6-b299-583240397247
+ a5b998ce-ec0d-4e30-bc82-74bcfe349e40
diff --git a/src/Presentation.Web/Presentation.Web.csproj b/src/Presentation.Web/Presentation.Web.csproj
index aee6d1a..9b2a2cd 100644
--- a/src/Presentation.Web/Presentation.Web.csproj
+++ b/src/Presentation.Web/Presentation.Web.csproj
@@ -7,7 +7,7 @@
net10.0
enable
enable
- c2325466-9b0d-494a-984a-11ad18457d3f
+ 7648e281-79e9-4021-a119-a68a91e3356a
diff --git a/src/Tests.Integration/Tests.Integration.csproj b/src/Tests.Integration/Tests.Integration.csproj
index cdc8408..4443584 100644
--- a/src/Tests.Integration/Tests.Integration.csproj
+++ b/src/Tests.Integration/Tests.Integration.csproj
@@ -8,7 +8,7 @@
false
enable
enable
- 998fefad-d248-4bad-9d33-8a060711dd88
+ af5cf729-dd91-4fde-9c45-d8afbfd262fd
true