audit log

This commit is contained in:
Konstantin Lebedev
2021-12-07 12:15:48 +05:00
parent 3ac48cd540
commit 4ec8715f20
17 changed files with 106 additions and 87 deletions

View File

@@ -24,6 +24,7 @@ import (
"crypto/sha256"
"encoding/hex"
"errors"
xhttp "github.com/chrislusf/seaweedfs/weed/s3api/http"
"github.com/chrislusf/seaweedfs/weed/s3api/s3err"
"hash"
"io"
@@ -90,7 +91,7 @@ func (iam *IdentityAccessManagement) calculateSeedSignature(r *http.Request) (cr
return nil, "", "", time.Time{}, s3err.ErrInvalidAccessKeyID
}
bucket, _ := getBucketAndObject(r)
bucket, _ := xhttp.GetBucketAndObject(r)
if !identity.canDo("Write", bucket) {
errCode = s3err.ErrAccessDenied
return