fix(iam): ensure access key status is persisted and defaulted to Active (#8341)
* Fix master leader election startup issue Fixes #error-log-leader-not-selected-yet * not useful test * fix(iam): ensure access key status is persisted and defaulted to Active * make pb * update tests * using constants
This commit is contained in:
@@ -36,6 +36,7 @@ import (
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||
weed_iam "github.com/seaweedfs/seaweedfs/weed/iam"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
||||
"github.com/seaweedfs/seaweedfs/weed/s3api/s3err"
|
||||
@@ -410,7 +411,7 @@ func (iam *IdentityAccessManagement) validateSTSSessionToken(r *http.Request, se
|
||||
cred := &Credential{
|
||||
AccessKey: sessionInfo.Credentials.AccessKeyId,
|
||||
SecretKey: sessionInfo.Credentials.SecretAccessKey,
|
||||
Status: "Active",
|
||||
Status: weed_iam.AccessKeyStatusActive,
|
||||
Expiration: sessionInfo.ExpiresAt.Unix(),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user