aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/auth_credentials.go
diff options
context:
space:
mode:
authorTom Crasset <25140344+tcrasset@users.noreply.github.com>2025-02-07 19:54:31 +0100
committerGitHub <noreply@github.com>2025-02-07 10:54:31 -0800
commita7b964af96cd6bc07fc89571cc5f3f8048464cb3 (patch)
tree8d88b37154f72da6b101a6f1def1eff7a2092bd7 /weed/s3api/auth_credentials.go
parente8d8bfccccc666bbef4f1019f880e9aed5aea668 (diff)
downloadseaweedfs-a7b964af96cd6bc07fc89571cc5f3f8048464cb3.tar.xz
seaweedfs-a7b964af96cd6bc07fc89571cc5f3f8048464cb3.zip
add s3 signature tests and prepare implementation of STREAMING-UNSIGNED-PAYLOAD-TRAILER (#6525)
* add tests for s3 signature * add test for newSignV4ChunkedReader.Read() * add glog import
Diffstat (limited to 'weed/s3api/auth_credentials.go')
-rw-r--r--weed/s3api/auth_credentials.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go
index e80773993..1fb118d6f 100644
--- a/weed/s3api/auth_credentials.go
+++ b/weed/s3api/auth_credentials.go
@@ -364,6 +364,9 @@ func (iam *IdentityAccessManagement) authRequest(r *http.Request, action Action)
glog.V(3).Infof("post policy auth type")
r.Header.Set(s3_constants.AmzAuthType, "PostPolicy")
return identity, s3err.ErrNone
+ case authTypeStreamingUnsigned:
+ glog.V(3).Infof("unsigned streaming upload")
+ return identity, s3err.ErrNone
case authTypeJWT:
glog.V(3).Infof("jwt auth type")
r.Header.Set(s3_constants.AmzAuthType, "Jwt")
@@ -412,6 +415,10 @@ func (iam *IdentityAccessManagement) authUser(r *http.Request) (*Identity, s3err
var authType string
switch getRequestAuthType(r) {
case authTypeStreamingSigned:
+ glog.V(3).Infof("signed streaming upload")
+ return identity, s3err.ErrNone
+ case authTypeStreamingUnsigned:
+ glog.V(3).Infof("unsigned streaming upload")
return identity, s3err.ErrNone
case authTypeUnknown:
glog.V(3).Infof("unknown auth type")