SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
vector: carry the full identity through s3vectors auth (#12152)
Chris Lu10ba1b782fc1
diff --git a/weed/s3api/s3vectors/server.go b/weed/s3api/s3vectors/server.goindex bcea9907ef..71130c1f50 100644--- a/weed/s3api/s3vectors/server.go+++ b/weed/s3api/s3vectors/server.go@@ -9,6 +9,7 @@ import ("github.com/gorilla/mux""github.com/seaweedfs/seaweedfs/weed/pb/filer_pb""github.com/seaweedfs/seaweedfs/weed/pb/vector_pb"+ "github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants""github.com/seaweedfs/seaweedfs/weed/s3api/s3err""github.com/seaweedfs/seaweedfs/weed/s3api/s3tables")@@ -90,12 +91,13 @@ func (s *Server) dispatch(w http.ResponseWriter, r *http.Request) {// Auth authenticates the caller and puts the identity in the request context.func (s *Server) Auth(handler http.HandlerFunc) http.HandlerFunc {return func(w http.ResponseWriter, r *http.Request) {- identity, _, errCode := s.authenticator.AuthenticateRequest(r)+ identity, identityObj, errCode := s.authenticator.AuthenticateRequest(r)if errCode != s3err.ErrNone {writeError(w, http.StatusForbidden, "AccessDenied", "authentication failed")return}- r = r.WithContext(contextWithIdentity(r.Context(), identity))+ r = r.WithContext(s3_constants.SetIdentityInContext(+ contextWithIdentity(r.Context(), identity), identityObj))handler(w, r)}}