diff options
Diffstat (limited to 'weed/s3api/auth_credentials.go')
| -rw-r--r-- | weed/s3api/auth_credentials.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go index 876acd7cf..f2d057b90 100644 --- a/weed/s3api/auth_credentials.go +++ b/weed/s3api/auth_credentials.go @@ -2,12 +2,13 @@ package s3api import ( "fmt" - "github.com/seaweedfs/seaweedfs/weed/s3api/s3account" "net/http" "os" "strings" "sync" + "github.com/seaweedfs/seaweedfs/weed/s3api/s3account" + "github.com/seaweedfs/seaweedfs/weed/filer" "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/pb" @@ -31,6 +32,8 @@ type IdentityAccessManagement struct { identities []*Identity isAuthEnabled bool domain string + hashes map[string]*sync.Pool + hashMu sync.RWMutex } type Identity struct { @@ -77,6 +80,7 @@ func (action Action) getPermission() Permission { func NewIdentityAccessManagement(option *S3ApiServerOption) *IdentityAccessManagement { iam := &IdentityAccessManagement{ domain: option.DomainName, + hashes: make(map[string]*sync.Pool), } if option.Config != "" { if err := iam.loadS3ApiConfigurationFromFile(option.Config); err != nil { |
