{ "$schema": "../schema/vector.schema.json", "vectors": [ { "id": "cors-0001", "group": "cors", "kind": "api", "title": "CORS preflight requesting a non-allowed header is rejected", "description": "A rule allows origin '*' for GET and exposes x-amz-meta-header1 but declares no AllowedHeaders; an OPTIONS preflight asking for x-amz-meta-header2 returns 403 with no CORS headers. The source test sleeps 3s after PutBucketCors for propagation; the sleep is omitted here.", "tags": [ "tier-3", "cors", "errors", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L7016", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketAcl", "params": { "Bucket": "${res.b1.name}", "ACL": "public-read" } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "status": 404 } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "*" ], "ExposeHeaders": [ "x-amz-meta-header1" ] } ] } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}/bar", "headers": { "Origin": "example.origin", "Access-Control-Request-Headers": "x-amz-meta-header2", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } } ] }, { "id": "cors-0002", "group": "cors", "kind": "api", "title": "CORS origin wildcard matching on unauthenticated GET, PUT and OPTIONS requests", "description": "With rules for origins '*suffix', 'start*end', 'prefix*' (GET) and '*.put' (PUT) on a public-read bucket, checks access-control-allow-origin/access-control-allow-methods on plain requests and OPTIONS preflights for matching and non-matching origins. The source test sleeps 3s after PutBucketCors for propagation; the sleep is omitted here.", "tags": [ "tier-3", "cors", "anon-access", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L6916", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketAcl", "params": { "Bucket": "${res.b1.name}", "ACL": "public-read" } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "status": 404 } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "*suffix" ] }, { "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "start*end" ] }, { "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "prefix*" ] }, { "AllowedMethods": [ "PUT" ], "AllowedOrigins": [ "*.put" ] } ] } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "foo.suffix" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "foo.suffix", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "foo.bar" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "foo.suffix.get" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "startend" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "startend", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "start1end" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "start1end", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "start12end" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "start12end", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "0start12end" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "prefix" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "prefix", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "prefix.suffix" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "prefix.suffix", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "bla.prefix" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}/bar", "headers": { "Origin": "foo.suffix" }, "sign": false, "expect": { "status": 404, "headers": { "access-control-allow-origin": "foo.suffix", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "PUT", "path": "/${res.b1.name}/bar", "headers": { "Origin": "foo.suffix", "Access-Control-Request-Method": "GET", "content-length": "0" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": "foo.suffix", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "PUT", "path": "/${res.b1.name}/bar", "headers": { "Origin": "foo.suffix", "Access-Control-Request-Method": "PUT", "content-length": "0" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "PUT", "path": "/${res.b1.name}/bar", "headers": { "Origin": "foo.suffix", "Access-Control-Request-Method": "DELETE", "content-length": "0" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "PUT", "path": "/${res.b1.name}/bar", "headers": { "Origin": "foo.suffix", "content-length": "0" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "PUT", "path": "/${res.b1.name}/bar", "headers": { "Origin": "foo.put", "content-length": "0" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": "foo.put", "access-control-allow-methods": "PUT" } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}/bar", "headers": { "Origin": "foo.suffix" }, "sign": false, "expect": { "status": 404, "headers": { "access-control-allow-origin": "foo.suffix", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "sign": false, "expect": { "status": 400, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "foo.suffix" }, "sign": false, "expect": { "status": 400, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "bla" }, "sign": false, "expect": { "status": 400, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}/bar", "headers": { "Origin": "foo.suffix", "Access-Control-Request-Method": "GET", "content-length": "0" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "foo.suffix", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "foo.bar", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "foo.suffix.get", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "startend", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "startend", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "start1end", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "start1end", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "start12end", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "start12end", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "0start12end", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "prefix", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "prefix", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "prefix.suffix", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "prefix.suffix", "access-control-allow-methods": "GET" } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "bla.prefix", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "foo.put", "Access-Control-Request-Method": "GET" }, "sign": false, "expect": { "status": 403, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "OPTIONS", "path": "/${res.b1.name}", "headers": { "Origin": "foo.put", "Access-Control-Request-Method": "PUT" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "foo.put", "access-control-allow-methods": "PUT" } } } } ] }, { "id": "cors-0003", "group": "cors", "kind": "api", "title": "CORS wildcard '*' origin echoes '*' in access-control-allow-origin", "description": "With a single GET rule allowing origin '*' on a public-read bucket, a request without an Origin header gets no CORS headers and a request with any Origin gets access-control-allow-origin '*'. The source test sleeps 3s after PutBucketCors for propagation; the sleep is omitted here.", "tags": [ "tier-3", "cors", "anon-access", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L6991", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketAcl", "params": { "Bucket": "${res.b1.name}", "ACL": "public-read" } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "status": 404 } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "*" ] } ] } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": { "$absent": true }, "access-control-allow-methods": { "$absent": true } } } } }, { "$http": { "method": "GET", "path": "/${res.b1.name}", "headers": { "Origin": "example.origin" }, "sign": false, "expect": { "status": 200, "headers": { "access-control-allow-origin": "*", "access-control-allow-methods": "GET" } } } } ] }, { "id": "cors-0004", "group": "cors", "kind": "api", "title": "Put, get and delete bucket CORS configuration", "description": "GetBucketCors returns 404 before any configuration is set, the stored rules round-trip exactly, and GetBucketCors returns 404 again after DeleteBucketCors.", "tags": [ "tier-3", "cors", "errors", "source:ceph-s3-tests" ], "source": "https://github.com/ceph/s3-tests/blob/5522d1c351f75bc00ae0f64f742f3f095f5939d9/s3tests/functional/test_s3.py#L6881", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "status": 404 } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedMethods": [ "GET", "PUT" ], "AllowedOrigins": [ "*.get", "*.put" ] } ] } } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "response": { "CORSRules": [ { "AllowedMethods": [ "GET", "PUT" ], "AllowedOrigins": [ "*.get", "*.put" ] } ] } } } }, { "$operation": { "name": "DeleteBucketCors", "params": { "Bucket": "${res.b1.name}" } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "status": 404 } } } ] }, { "id": "cors-0005", "group": "cors", "kind": "api", "title": "CORS configuration: put, replace with multiple rules, update, and delete returns NoSuchCORSConfiguration", "tags": [ "tier-3", "cors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/basic/15.py#L14", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedHeaders": [ "*" ], "AllowedMethods": [ "GET", "HEAD" ], "AllowedOrigins": [ "*" ], "MaxAgeSeconds": 3000 } ] } } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "response": { "CORSRules": [ { "AllowedMethods": [ "GET", "HEAD" ], "AllowedOrigins": [ "*" ] } ] } } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "ID": "Rule1", "AllowedHeaders": [ "Authorization", "Content-Type" ], "AllowedMethods": [ "GET", "POST" ], "AllowedOrigins": [ "https://example.com", "https://app.example.com" ], "ExposeHeaders": [ "ETag", "x-amz-request-id" ], "MaxAgeSeconds": 3600 }, { "ID": "Rule2", "AllowedHeaders": [ "*" ], "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "https://public.example.com" ], "MaxAgeSeconds": 300 }, { "ID": "Rule3", "AllowedMethods": [ "PUT", "DELETE" ], "AllowedOrigins": [ "https://admin.example.com" ], "AllowedHeaders": [ "x-amz-*" ], "MaxAgeSeconds": 7200 } ] } } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "response": { "CORSRules": { "$length": 3 } } } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedHeaders": [ "Content-Type" ], "AllowedMethods": [ "GET" ], "AllowedOrigins": [ "https://updated.example.com" ], "MaxAgeSeconds": 600 } ] } } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "response": { "CORSRules": [ { "AllowedOrigins": [ "https://updated.example.com" ] } ] } } } }, { "$operation": { "name": "DeleteBucketCors", "params": { "Bucket": "${res.b1.name}" } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "status": 404, "error": "NoSuchCORSConfiguration" } } } ] }, { "id": "cors-0006", "group": "cors", "kind": "api", "title": "CORS rule limit: 100 rules accepted, 101 rules rejected", "description": "The original test accepted either TooManyRules or InvalidRequest for the 101-rule case; only the shared 400 status is asserted here.", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/cors/test_cors_validation.py#L54", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "https://site0.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site1.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site2.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site3.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site4.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site5.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site6.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site7.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site8.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site9.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site10.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site11.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site12.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site13.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site14.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site15.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site16.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site17.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site18.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site19.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site20.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site21.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site22.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site23.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site24.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site25.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site26.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site27.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site28.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site29.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site30.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site31.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site32.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site33.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site34.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site35.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site36.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site37.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site38.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site39.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site40.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site41.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site42.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site43.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site44.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site45.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site46.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site47.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site48.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site49.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site50.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site51.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site52.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site53.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site54.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site55.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site56.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site57.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site58.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site59.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site60.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site61.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site62.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site63.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site64.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site65.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site66.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site67.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site68.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site69.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site70.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site71.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site72.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site73.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site74.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site75.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site76.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site77.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site78.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site79.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site80.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site81.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site82.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site83.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site84.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site85.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site86.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site87.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site88.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site89.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site90.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site91.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site92.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site93.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site94.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site95.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site96.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site97.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site98.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site99.com" ], "AllowedMethods": [ "GET" ] } ] } } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "https://site0.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site1.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site2.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site3.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site4.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site5.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site6.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site7.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site8.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site9.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site10.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site11.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site12.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site13.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site14.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site15.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site16.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site17.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site18.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site19.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site20.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site21.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site22.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site23.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site24.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site25.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site26.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site27.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site28.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site29.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site30.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site31.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site32.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site33.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site34.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site35.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site36.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site37.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site38.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site39.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site40.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site41.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site42.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site43.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site44.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site45.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site46.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site47.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site48.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site49.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site50.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site51.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site52.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site53.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site54.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site55.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site56.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site57.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site58.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site59.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site60.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site61.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site62.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site63.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site64.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site65.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site66.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site67.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site68.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site69.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site70.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site71.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site72.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site73.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site74.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site75.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site76.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site77.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site78.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site79.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site80.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site81.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site82.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site83.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site84.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site85.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site86.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site87.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site88.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site89.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site90.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site91.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site92.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site93.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site94.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site95.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site96.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site97.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site98.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site99.com" ], "AllowedMethods": [ "GET" ] }, { "AllowedOrigins": [ "https://site101.com" ], "AllowedMethods": [ "GET" ] } ] } }, "expect": { "status": 400 } } } ] }, { "id": "cors-0007", "group": "cors", "kind": "api", "title": "PutBucketCors rejects unsupported HTTP methods in AllowedMethods", "description": "The original test accepted either InvalidArgument or MalformedXML; only the shared 400 status is asserted here.", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/cors/test_cors_validation.py#L94", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "GET", "INVALID", "PATCH" ] } ] } }, "expect": { "status": 400 } } } ] }, { "id": "cors-0008", "group": "cors", "kind": "api", "title": "MaxAgeSeconds: negative rejected, zero and large values accepted", "description": "The original test accepted any error for the negative case; a 400 rejection is asserted here.", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/cors/test_cors_validation.py#L156", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "GET" ], "MaxAgeSeconds": -1 } ] } }, "expect": { "status": 400 } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "GET" ], "MaxAgeSeconds": 0 } ] } } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "GET" ], "MaxAgeSeconds": 86400 } ] } } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "GET" ], "MaxAgeSeconds": 31536000 } ] } } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "GET" ], "MaxAgeSeconds": 999999999 } ] } } } } ] }, { "id": "cors-0009", "group": "cors", "kind": "api", "title": "DeleteBucketCors removes the configuration; GetBucketCors then returns NoSuchCORSConfiguration", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/cors/test_cors_validation.py#L193", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "GET" ] } ] } } } }, { "$operation": { "name": "DeleteBucketCors", "params": { "Bucket": "${res.b1.name}" } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "status": 404, "error": "NoSuchCORSConfiguration" } } } ] }, { "id": "cors-0010", "group": "cors", "kind": "api", "title": "DeleteBucketCors on a non-existent bucket returns NoSuchBucket", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L470", "steps": [ { "$operation": { "name": "DeleteBucketCors", "params": { "Bucket": "msst-non-existing-bucket-edge1" }, "expect": { "error": "NoSuchBucket" } } } ] }, { "id": "cors-0011", "group": "cors", "kind": "api", "title": "DeleteBucketCors succeeds on unset configuration and removes a set configuration", "tags": [ "tier-3", "cors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L491", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "DeleteBucketCors", "params": { "Bucket": "${res.b1.name}" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Meta-Header" ], "ExposeHeaders": [ "Content-Disposition" ], "MaxAgeSeconds": 5000 } ] } } } }, { "$operation": { "name": "DeleteBucketCors", "params": { "Bucket": "${res.b1.name}" } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "error": "NoSuchCORSConfiguration" } } } ] }, { "id": "cors-0012", "group": "cors", "kind": "api", "title": "GetBucketCors on a bucket without CORS configuration returns NoSuchCORSConfiguration", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L370", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "error": "NoSuchCORSConfiguration" } } } ] }, { "id": "cors-0013", "group": "cors", "kind": "api", "title": "GetBucketCors on a non-existent bucket returns NoSuchBucket", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L349", "steps": [ { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "msst-non-existing-bucket-edge1" }, "expect": { "error": "NoSuchBucket" } } } ] }, { "id": "cors-0014", "group": "cors", "kind": "api", "title": "PutBucketCors then GetBucketCors round-trips the rules", "description": "Original test compared the list members as sets; this vector asserts them in the order they were put, which is the order S3 returns them.", "tags": [ "tier-3", "cors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L396", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com", "helloworld.net" ], "AllowedMethods": [ "POST", "PUT", "HEAD" ], "AllowedHeaders": [ "X-Amz-Date", "X-Amz-Meta-Something" ], "ExposeHeaders": [ "Authorization", "Content-Disposition" ], "MaxAgeSeconds": 125 }, { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "DELETE", "GET", "HEAD" ], "AllowedHeaders": [ "Content-*" ], "ExposeHeaders": [ "Authorization", "X-Amz-Date", "X-Amz-Content-Sha256" ], "ID": "my_extra_unique_id", "MaxAgeSeconds": -200 } ] } } } }, { "$operation": { "name": "GetBucketCors", "params": { "Bucket": "${res.b1.name}" }, "expect": { "response": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com", "helloworld.net" ], "AllowedMethods": [ "POST", "PUT", "HEAD" ], "AllowedHeaders": [ "X-Amz-Date", "X-Amz-Meta-Something" ], "ExposeHeaders": [ "Authorization", "Content-Disposition" ], "MaxAgeSeconds": 125 }, { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "DELETE", "GET", "HEAD" ], "AllowedHeaders": [ "Content-*" ], "ExposeHeaders": [ "Authorization", "X-Amz-Date", "X-Amz-Content-Sha256" ], "ID": "my_extra_unique_id", "MaxAgeSeconds": -200 } ] } } } } ] }, { "id": "cors-0015", "group": "cors", "kind": "api", "title": "PutBucketCors with an empty CORSRules array returns MalformedXML", "description": "Original test also accepted InvalidRequest as the error code.", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L63", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [] } }, "expect": { "error": "MalformedXML" } } } ] }, { "id": "cors-0016", "group": "cors", "kind": "api", "title": "PutBucketCors rejects invalid header names in AllowedHeaders", "description": "Header names containing spaces, colons, parentheses, slashes, brackets, equals or quotes are invalid. Original test also accepted InvalidArgument or AccessControlAllowRequestHeaderNotAllowed as the error code.", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L149", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Date", "X-Amz-Content-Sha256", "invalid header" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "Authorization", "X-Custom:Header" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "Content-Length", "X(Custom)" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "Content-Encoding", "Bad/Header" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "Date", "X[Key]" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Custom-Header", "Bad=Name" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X\"Quote\"" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } } ] }, { "id": "cors-0017", "group": "cors", "kind": "api", "title": "PutBucketCors rejects invalid header names in ExposeHeaders", "description": "Header names containing spaces, colons, parentheses, slashes, brackets, equals or quotes are invalid. Original test also accepted InvalidArgument or UnexpectedContent as the error code.", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L149", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "X-Amz-Date", "X-Amz-Content-Sha256", "invalid header" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization", "X-Custom:Header" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Content-Length", "X(Custom)" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Content-Encoding", "Bad/Header" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Date", "X[Key]" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "X-Amz-Custom-Header", "Bad=Name" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "X\"Quote\"" ] } ] } }, "expect": { "error": "InvalidRequest" } } } ] }, { "id": "cors-0018", "group": "cors", "kind": "api", "title": "PutBucketCors rejects invalid HTTP methods in AllowedMethods", "description": "Only uppercase GET, PUT, POST, DELETE, HEAD are valid CORS methods. Original test also accepted CORSInvalidAccessControlMethod or InvalidArgument as the error code.", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L94", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "get" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "put" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "post" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "head" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "delete" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "GET", "PATCH" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST", "OPTIONS" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "GET", "HEAD", "POST", "PUT", "DELETE", "invalid_method" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization" ] } ] } }, "expect": { "error": "InvalidRequest" } } } ] }, { "id": "cors-0019", "group": "cors", "kind": "api", "title": "PutBucketCors with malformed Content-MD5 returns InvalidDigest and wrong Content-MD5 returns BadDigest", "description": "Original test accepted InvalidDigest or InvalidRequest for the malformed value, and BadDigest or InvalidDigest for the well-formed-but-wrong value.", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L222", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com", "something.net" ], "AllowedMethods": [ "POST", "PUT", "HEAD" ], "AllowedHeaders": [ "X-Amz-Date", "X-Amz-Meta-Something", "Content-Type" ], "ExposeHeaders": [ "Authorization", "Content-Disposition" ], "MaxAgeSeconds": 125, "ID": "my-id" } ] }, "ContentMD5": "invalid" }, "expect": { "error": "InvalidDigest" } } }, { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com", "something.net" ], "AllowedMethods": [ "POST", "PUT", "HEAD" ], "AllowedHeaders": [ "X-Amz-Date", "X-Amz-Meta-Something", "Content-Type" ], "ExposeHeaders": [ "Authorization", "Content-Disposition" ], "MaxAgeSeconds": 125, "ID": "my-id" } ] }, "ContentMD5": "uU0nuZNNPgilLlLX2n2r+s==" }, "expect": { "error": "BadDigest" } } } ] }, { "id": "cors-0020", "group": "cors", "kind": "api", "title": "PutBucketCors on a non-existent bucket returns NoSuchBucket", "tags": [ "tier-3", "cors", "errors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L31", "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "msst-non-existing-bucket-edge1", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "GET" ] } ] } }, "expect": { "error": "NoSuchBucket" } } } ] }, { "id": "cors-0021", "group": "cors", "kind": "api", "title": "PutBucketCors accepts multiple rules with wildcard origins and negative MaxAgeSeconds", "tags": [ "tier-3", "cors", "source:msst-s3" ], "source": "https://github.com/linux-kdevops/msst-s3/blob/b84a323cca5ee862e87677043f672f156c46b448/tests/edge/test_bucket_cors.py#L287", "prerequisites": [ { "$bucket": { "handle": "b1" } } ], "steps": [ { "$operation": { "name": "PutBucketCors", "params": { "Bucket": "${res.b1.name}", "CORSConfiguration": { "CORSRules": [ { "AllowedOrigins": [ "http://origin.com" ], "AllowedMethods": [ "POST", "PUT" ], "AllowedHeaders": [ "X-Amz-Date" ], "ExposeHeaders": [ "Authorization" ], "MaxAgeSeconds": -100 }, { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "DELETE", "GET", "HEAD" ], "AllowedHeaders": [ "Content-Type", "Content-Encoding", "Content-MD5" ], "ExposeHeaders": [ "Authorization", "X-Amz-Date", "X-Amz-Content-Sha256" ], "ID": "id", "MaxAgeSeconds": 3000 }, { "AllowedOrigins": [ "http://example.com", "https://something.net", "http://*origin.com" ], "AllowedMethods": [ "GET" ] } ] } } } } ] } ] }