Add comment field to service accounts (#16380)

This commit is contained in:
Anis Elleuch
2023-01-10 18:57:52 +01:00
committed by GitHub
parent 2146ed4033
commit 1ece3d1dfe
7 changed files with 22 additions and 3 deletions
+3
View File
@@ -919,6 +919,7 @@ type newServiceAccountOpts struct {
sessionPolicy *iampolicy.Policy
accessKey string
secretKey string
comment string
claims map[string]interface{}
}
@@ -989,6 +990,7 @@ func (sys *IAMSys) NewServiceAccount(ctx context.Context, parentUser string, gro
cred.ParentUser = parentUser
cred.Groups = groups
cred.Status = string(auth.AccountOn)
cred.Comment = opts.comment
updatedAt, err := sys.store.AddServiceAccount(ctx, cred)
if err != nil {
@@ -1003,6 +1005,7 @@ type updateServiceAccountOpts struct {
sessionPolicy *iampolicy.Policy
secretKey string
status string
comment string
}
// UpdateServiceAccount - edit a service account