s3tables: harden auth and error handling
- Add authorization checks to all S3 Tables handlers (policy, table ops) to enforce security - Improve error handling to distinguish between NotFound (404) and InternalError (500) - Fix directory FileMode usage in filer_ops - Improve test randomness for version tokens - Update permissions comments to acknowledge IAM gaps
This commit is contained in:
@@ -495,7 +495,7 @@ func waitForS3Ready(endpoint string, timeout time.Duration) error {
|
||||
// randomString generates a random string for unique naming
|
||||
func randomString(length int) string {
|
||||
const charset = "abcdefghijklmnopqrstuvwxyz0123456789"
|
||||
rng := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
rng := rand.New(rand.NewSource(time.Now().UnixNano() + rand.Int63()))
|
||||
b := make([]byte, length)
|
||||
for i := range b {
|
||||
b[i] = charset[rng.Intn(len(charset))]
|
||||
|
||||
Reference in New Issue
Block a user