Reverts the tenant-ID-from-context change in da5fcd3. The storage path encodes the resource owner's tenant, and the presigned-URL verifier uses that ID to look up the owning tenant's StorageEngineConfig. Using the caller's tenant ID from context would break cross-tenant shared resources — e.g. when tenant Y reads an image from a KB shared by tenant X, signing with Y would cause the verifier to open Y's storage backend and 404 on X's file. Keep: - presignDefaultTTL shortened from 24h to 2h (independent improvement). - godoc note on ParseTenantIDFromStoragePath flagging the ambiguity for cloud paths with numeric bucket/region names. - Unit tests for path-based tenant extraction and the no-external-URL backward-compat path. |
||
|---|---|---|
| .. | ||
| crypto.go | ||
| crypto_test.go | ||
| debug.go | ||
| extraheaders.go | ||
| extraheaders_test.go | ||
| filesize.go | ||
| fileutil.go | ||
| httputil.go | ||
| inject.go | ||
| inject_test.go | ||
| json.go | ||
| log_sanitize.go | ||
| presign.go | ||
| presign_test.go | ||
| security.go | ||
| security_test.go | ||
| taskid.go | ||