Skip to content

Commit 7225e21

Browse files
Merge pull request #17147 from alkohli/rotint
Rotate internal secrets for Azure Local
2 parents f8d306b + 8ab783a commit 7225e21

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

azure-local/manage/manage-secrets-rotation.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,64 @@ To change the deployment service principal, follow these steps:
158158
Set-AzureStackRPSpCredential -SubscriptionID $SubscriptionId -TenantID $TenantId -AppId $AppId -NewPassword $NewPassword
159159
```
160160

161+
## Rotate internal secrets
162+
163+
This section describes how you can rotate internal secrets. Internal secrets include certificates, passwords, secure strings, and keys used by the Azure Local infrastructure. Internal secret rotation is only required if you suspect one has been compromised, or you've received an expiration alert.
164+
165+
The exact steps for secret rotation are different depending on the software version your Azure Local instance is running.
166+
167+
### Azure Local instance running 2411.2 and later
168+
169+
1. Sign in to one of the Azure Local nodes using deployment user credentials.
170+
1. Start secret rotation. Run the following PowerShell command:
171+
172+
```PowerShell
173+
Start-SecretRotation
174+
```
175+
176+
### Azure Local instance running 2411.1 to 2411.0
177+
178+
1. Sign in to one of the Azure Local nodes using deployment user credentials.
179+
1. Update the CA Certificate password in ECE store. Run the following PowerShell command:
180+
181+
```PowerShell
182+
$SecureSecretText = ConvertTo-SecureString -String "<Replace with a strong password>" -AsPlainText -Force
183+
$CACertCred = New-Object -Type PSCredential -ArgumentList "CACertUser,$SecureSecretText"
184+
Set-ECEServiceSecret -ContainerName CACertificateCred -Credential $CACertCred
185+
```
186+
187+
1. Start secret rotation. Run the following PowerShell command:
188+
189+
```PowerShell
190+
Start-SecretRotation
191+
```
192+
193+
### Azure Local instance running 2408.2 to 2405.3
194+
195+
1. Sign in to one of the Azure Local nodes using deployment user credentials.
196+
1. Update the CA Certificate password in ECE store. Run the following PowerShell command:
197+
198+
```PowerShell
199+
$SecureSecretText = ConvertTo-SecureString -String "<Replace with a strong password>" -AsPlainText -Force
200+
$CACertCred = New-Object -Type PSCredential -ArgumentList "CACertificateCred,$SecureSecretText"
201+
Set-ECEServiceSecret -ContainerName CACertificateCred -Credential $CACertCred
202+
```
203+
204+
1. Delete FCA cert from all the cluster nodes and restart FCA service. Run the following command on each node of your Azure Local instance:
205+
206+
```PowerShell
207+
$cert = Get-ChildItem -Recurse cert:\LocalMachine\My | Where-Object { $_.Subject -like "CN=FileCopyAgentKeyIdentifier*" }
208+
$cert | Remove-Item
209+
restart-service "AzureStack File Copy Agent*"
210+
```
211+
212+
1. Start secret rotation. Run the following PowerShell command:
213+
214+
```PowerShell
215+
Start-SecretRotation
216+
```
217+
218+
161219
## Next steps
162220
163221
[Complete the prerequisites and checklist and install Azure Local](../deploy/deployment-prerequisites.md).

0 commit comments

Comments
 (0)