Skip to content

Commit cc0fe1f

Browse files
committed
GHE Kredz related
1 parent 247a804 commit cc0fe1f

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

share/github-backup-utils/ghe-backup-settings

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ if ghe-ssh "$host" -- ghe-config --true app.actions.enabled; then
102102
backup-secret "Actions SPS validation cert thumbprint" "actions-sps-validation-cert-thumbprint" "secrets.actions.SpsValidationCertThumbprint"
103103

104104
backup-secret "Actions Launch secrets encryption/decryption" "actions-launch-secrets-private-key" "secrets.launch.actions-secrets-private-key"
105-
backup-secret "Actions Launch credz HMAC key" "actions-launch-credz-hmac" "secrets.launch.credz-hmac-secret"
106105
backup-secret "Actions Launch deployer HMAC key" "actions-launch-deployer-hmac" "secrets.launch.deployer-hmac-secret"
107106
backup-secret "Actions Launch Client id" "actions-launch-client-id" "secrets.launch.client-id"
108107
backup-secret "Actions Launch Client secret" "actions-launch-client-secret" "secrets.launch.client-secret"
@@ -114,6 +113,8 @@ if ghe-ssh "$host" -- ghe-config --true app.actions.enabled; then
114113
backup-secret "Actions Launch action runner secret" "actions-launch-action-runner-secret" "secrets.launch.action-runner-secret"
115114
backup-secret "Actions Launch service cert" "actions-launch-azp-app-cert" "secrets.launch.azp-app-cert"
116115
backup-secret "Actions Launch service private key" "actions-launch-app-app-private-key" "secrets.launch.azp-app-private-key"
116+
117+
backup-secret "Kredz credz HMAC key" "kredz-credz-hmac" "secrets.kredz.credz-hmac-secret"
117118
fi
118119

119120
if ghe-ssh "$host" -- "test -f $GHE_REMOTE_DATA_USER_DIR/common/idp.crt"; then

share/github-backup-utils/ghe-restore-actions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ restore-secret "Actions service principal cert" "actions-service-principal-cert"
7070
restore-secret "Actions SPS validation cert thumbprint" "actions-sps-validation-cert-thumbprint" "secrets.actions.SpsValidationCertThumbprint"
7171

7272
restore-secret "Actions Launch secrets encryption/decryption" "actions-launch-secrets-private-key" "secrets.launch.actions-secrets-private-key"
73-
restore-secret "Actions Launch credz HMAC key" "actions-launch-credz-hmac" "secrets.launch.credz-hmac-secret"
7473
restore-secret "Actions Launch deployer HMAC key" "actions-launch-deployer-hmac" "secrets.launch.deployer-hmac-secret"
7574
restore-secret "Actions Launch Client id" "actions-launch-client-id" "secrets.launch.client-id"
7675
restore-secret "Actions Launch Client secret" "actions-launch-client-secret" "secrets.launch.client-secret"
@@ -86,6 +85,8 @@ restore-secret "Actions Launch service private key" "actions-launch-app-app-priv
8685
restore-secret "Actions Launch token oauth key" "actions-oauth-s2s-signing-key" "secrets.launch.token-oauth-key"
8786
restore-secret "Actions Launch token oauth cert" "actions-oauth-s2s-signing-cert" "secrets.launch.token-oauth-cert"
8887

88+
restore-secret "Kredz credz HMAC key" "kredz-credz-hmac" "secrets.kredz.credz-hmac-secret"
89+
8990
# Setup the database logins.
9091
ghe_verbose "* Restoring database logins and users to $host ..."
9192

test/test-ghe-backup.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ begin_test "ghe-backup takes backup of Actions settings"
493493
"secrets.actions.SpsValidationCertThumbprint"
494494

495495
"secrets.launch.actions-secrets-private-key"
496-
"secrets.launch.credz-hmac-secret"
497496
"secrets.launch.deployer-hmac-secret"
498497
"secrets.launch.client-id"
499498
"secrets.launch.client-secret"
@@ -507,6 +506,8 @@ begin_test "ghe-backup takes backup of Actions settings"
507506
"secrets.launch.token-oauth-cert"
508507
"secrets.launch.azp-app-cert"
509508
"secrets.launch.azp-app-private-key"
509+
510+
"secrets.kredz.credz-hmac-secret"
510511
)
511512

512513
# these 5 were removed in later versions, so we extract them as best effort
@@ -538,7 +539,6 @@ begin_test "ghe-backup takes backup of Actions settings"
538539
"actions-sps-validation-cert-thumbprint"
539540

540541
"actions-launch-secrets-private-key"
541-
"actions-launch-credz-hmac"
542542
"actions-launch-deployer-hmac"
543543
"actions-launch-client-id"
544544
"actions-launch-client-secret"
@@ -550,6 +550,8 @@ begin_test "ghe-backup takes backup of Actions settings"
550550
"actions-launch-action-runner-secret"
551551
"actions-launch-azp-app-cert"
552552
"actions-launch-app-app-private-key"
553+
554+
"kredz-credz-hmac"
553555
)
554556

555557
# Add the one optional file we included tests for

test/test-ghe-restore.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ begin_test "ghe-restore with Actions settings"
335335
"actions-sps-validation-cert-thumbprint"
336336

337337
"actions-launch-secrets-private-key"
338-
"actions-launch-credz-hmac"
339338
"actions-launch-deployer-hmac"
340339
"actions-launch-client-id"
341340
"actions-launch-client-secret"
@@ -347,6 +346,8 @@ begin_test "ghe-restore with Actions settings"
347346
"actions-launch-action-runner-secret"
348347
"actions-launch-azp-app-cert"
349348
"actions-launch-app-app-private-key"
349+
350+
"kredz-credz-hmac"
350351
)
351352

352353
for file in "${required_files[@]}"; do
@@ -374,7 +375,6 @@ begin_test "ghe-restore with Actions settings"
374375
"secrets.actions.SpsValidationCertThumbprint"
375376

376377
"secrets.launch.actions-secrets-private-key"
377-
"secrets.launch.credz-hmac-secret"
378378
"secrets.launch.deployer-hmac-secret"
379379
"secrets.launch.client-id"
380380
"secrets.launch.client-secret"
@@ -388,6 +388,8 @@ begin_test "ghe-restore with Actions settings"
388388
"secrets.launch.token-oauth-cert"
389389
"secrets.launch.azp-app-cert"
390390
"secrets.launch.azp-app-private-key"
391+
392+
"secrets.kredz.credz-hmac-secret"
391393
)
392394

393395
for secret in "${required_secrets[@]}"; do

0 commit comments

Comments
 (0)