mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: propagate service account deletes properly (#12717)
service account deletes were not propagating to remote peers, fix this.
This commit is contained in:
parent
10fc30a989
commit
017722cf85
@ -956,6 +956,13 @@ func (a adminAPIHandlers) DeleteServiceAccount(w http.ResponseWriter, r *http.Re
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, nerr := range globalNotificationSys.DeleteServiceAccount(serviceAccount) {
|
||||||
|
if nerr.Err != nil {
|
||||||
|
logger.GetReqInfo(ctx).SetTags("peerAddress", nerr.Host.String())
|
||||||
|
logger.LogIf(ctx, nerr.Err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
writeSuccessNoContent(w)
|
writeSuccessNoContent(w)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1390,11 +1390,7 @@ func (sys *IAMSys) DeleteServiceAccount(ctx context.Context, accessKey string) e
|
|||||||
|
|
||||||
// It is ok to ignore deletion error on the mapped policy
|
// It is ok to ignore deletion error on the mapped policy
|
||||||
err := sys.store.deleteUserIdentity(context.Background(), accessKey, svcUser)
|
err := sys.store.deleteUserIdentity(context.Background(), accessKey, svcUser)
|
||||||
if err != nil {
|
if err != nil && err != errNoSuchUser {
|
||||||
// ignore if user is already deleted.
|
|
||||||
if err == errNoSuchUser {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user