-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Periodically rotate etcd storage account secret #984
base: master
Are you sure you want to change the base?
Periodically rotate etcd storage account secret #984
Conversation
519a744
to
33be110
Compare
33be110
to
afe351d
Compare
afe351d
to
5ae1574
Compare
5ae1574
to
9f42b83
Compare
Some small last-minute changes, nothing functional so good to review. Will run another final test after reviews are done. |
response, err := c.client.ListKeys(ctx, resourceGroupName, storageAccountName, &armstorage.AccountsClientListKeysOptions{ | ||
// doc: "Specifies type of the key to be listed. Possible value is kerb.. Specifying any value will set the value to kerb." | ||
Expand: ptr.To("kerb"), | ||
}) | ||
|
||
if err != nil { | ||
return "", err | ||
return nil, err | ||
} | ||
|
||
if len(response.Keys) < 1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit: but don't we expect the Keys to have a length of 2?
@@ -64,3 +75,7 @@ func (a *actuator) getBackupBucketGeneratedSecret(ctx context.Context, backupBuc | |||
} | |||
return secret, nil | |||
} | |||
|
|||
func shouldBeRotated(secret corev1.Secret) (bool, error) { | |||
return secret.CreationTimestamp.Time.Before(time.Now().AddDate(0, 0, -14)), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this configurable ?
@AndreasBurger You need rebase this pull request with latest master branch. Please check. |
How to categorize this PR?
/area security
/kind enhancement
/platform azure
What this PR does / why we need it:
Rotate the key used to authenticate with the storage account for etcd-backups periodically.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: