aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/auth_credentials.go
diff options
context:
space:
mode:
authorPatrick Schmidt <patrick.schmidt@innogames.com>2023-09-01 19:57:04 +0200
committerChris Lu <chrislusf@users.noreply.github.com>2023-09-05 10:33:27 -0700
commit98dcec0ee2023d24913941bfef7ecc5a7d2b78f8 (patch)
tree5c56c47e2feef02c4b08844fcc313d64f94486d8 /weed/s3api/auth_credentials.go
parentcdd817edf97fca305bb490b139d6a9b185d58f66 (diff)
downloadseaweedfs-98dcec0ee2023d24913941bfef7ecc5a7d2b78f8.tar.xz
seaweedfs-98dcec0ee2023d24913941bfef7ecc5a7d2b78f8.zip
Clean up old signature hash pools
Diffstat (limited to 'weed/s3api/auth_credentials.go')
-rw-r--r--weed/s3api/auth_credentials.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go
index f2d057b90..234dc100b 100644
--- a/weed/s3api/auth_credentials.go
+++ b/weed/s3api/auth_credentials.go
@@ -33,6 +33,7 @@ type IdentityAccessManagement struct {
isAuthEnabled bool
domain string
hashes map[string]*sync.Pool
+ hashCounters map[string]*int32
hashMu sync.RWMutex
}
@@ -79,8 +80,9 @@ func (action Action) getPermission() Permission {
func NewIdentityAccessManagement(option *S3ApiServerOption) *IdentityAccessManagement {
iam := &IdentityAccessManagement{
- domain: option.DomainName,
- hashes: make(map[string]*sync.Pool),
+ domain: option.DomainName,
+ hashes: make(map[string]*sync.Pool),
+ hashCounters: make(map[string]*int32),
}
if option.Config != "" {
if err := iam.loadS3ApiConfigurationFromFile(option.Config); err != nil {