OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
zzXpress
/
vendor
/
aws
/
aws-sdk-php
/
tests
/
EndpointV2
/
valid-rules
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:24 AM
rwxr-xr-x
📄
aws-region.json
1022 bytes
01/07/2025 11:32:05 AM
rw-r--r--
📄
default-values.json
986 bytes
01/07/2025 11:32:05 AM
rw-r--r--
📄
deprecated-param.json
824 bytes
01/07/2025 11:32:05 AM
rw-r--r--
📄
eventbridge.json
8.62 KB
01/07/2025 11:32:05 AM
rw-r--r--
📄
fns.json
2.45 KB
01/07/2025 11:32:05 AM
rw-r--r--
📄
get-attr-type-inference.json
918 bytes
01/07/2025 11:32:05 AM
rw-r--r--
📄
headers.json
978 bytes
01/07/2025 11:32:05 AM
rw-r--r--
📄
is-virtual-hostable-s3-bucket.json
971 bytes
01/07/2025 11:32:05 AM
rw-r--r--
📄
local-region-override.json
720 bytes
01/07/2025 11:32:05 AM
rw-r--r--
📄
parse-arn.json
6.39 KB
01/07/2025 11:32:05 AM
rw-r--r--
📄
parse-url.json
2.24 KB
01/07/2025 11:32:05 AM
rw-r--r--
📄
partition-fn.json
2.48 KB
01/07/2025 11:32:05 AM
rw-r--r--
📄
substring.json
1.97 KB
01/07/2025 11:32:05 AM
rw-r--r--
📄
uri-encode.json
948 bytes
01/07/2025 11:32:05 AM
rw-r--r--
📄
valid-hostlabel.json
1.21 KB
01/07/2025 11:32:05 AM
rw-r--r--
Editing: parse-arn.json
Close
{ "version": "1.3", "parameters": { "Region": { "type": "string", "builtIn": "AWS::Region" }, "Bucket": { "type": "string" }, "TestCaseId": { "type": "string" } }, "rules": [ { "documentation": "tests of invalid arns", "conditions": [ { "fn": "isSet", "argv": [ { "ref": "TestCaseId" } ] }, { "fn": "isSet", "argv": [ { "ref": "Bucket" } ] }, { "fn": "stringEquals", "argv": [ "{TestCaseId}", "invalid-arn" ] } ], "type": "tree", "rules": [ { "conditions": [ { "fn": "aws.parseArn", "argv": ["{Bucket}"] } ], "type": "error", "error": "A valid ARN was parsed but `{Bucket}` is not a valid ARN" }, { "conditions": [], "type": "error", "error": "Test case passed: `{Bucket}` is not a valid ARN." } ] }, { "documentation": "tests of valid arns", "conditions": [ { "fn": "isSet", "argv": [ { "ref": "TestCaseId" } ] }, { "fn": "isSet", "argv": [ { "ref": "Bucket" } ] }, { "fn": "stringEquals", "argv": [ "{TestCaseId}", "valid-arn" ] } ], "type": "tree", "rules": [ { "conditions": [ { "fn": "aws.parseArn", "argv": ["{Bucket}"], "assign": "arn" }, { "fn": "getAttr", "argv": [{"ref": "arn"}, "resourceId[0]"], "assign": "resource" } ], "type": "error", "error": "Test case passed: A valid ARN was parsed: service: `{arn#service}`, partition: `{arn#partition}, region: `{arn#region}`, accountId: `{arn#accountId}`, resource: `{resource}`" }, { "conditions": [], "type": "error", "error": "Test case failed: `{Bucket}` is a valid ARN but parseArn failed to parse it." } ] }, { "documentation": "region is set", "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Region" } ] }, { "fn": "aws.partition", "argv": [ "{Region}" ], "assign": "partitionResult" } ], "rules": [ { "documentation": "bucket is set, handle bucket specific endpoints", "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Bucket" } ] } ], "rules": [ { "documentation": "bucket is set and is an arn", "conditions": [ { "fn": "aws.parseArn", "argv": [ { "ref": "Bucket" } ], "assign": "bucketArn" } ], "rules": [ { "conditions": [ { "fn": "getAttr", "argv": [ { "ref": "bucketArn" }, "resourceId[1]" ], "assign": "outpostId" } ], "rules": [ { "conditions": [ { "fn": "stringEquals", "argv": [ "{outpostId}", "" ] } ], "error": "OutpostId was empty", "type": "error" }, { "conditions": [], "endpoint": { "url": "https://{outpostId}-{bucketArn#accountId}.{bucketArn#region}.{partitionResult#dnsSuffix}" }, "type": "endpoint" } ], "type": "tree" }, { "conditions": [], "error": "Invalid ARN: outpostId was not set", "type": "error" } ], "type": "tree" }, { "documentation": "bucket can be used as a host label", "conditions": [ { "fn": "isValidHostLabel", "argv": [ "{Bucket}", false ] } ], "endpoint": { "url": "https://{Bucket}.{Region}.amazonaws.com" }, "type": "endpoint" }, { "conditions": [], "documentation": "fallback: use bucket in the path", "endpoint": { "url": "https://{Region}.amazonaws.com/{Bucket}" }, "type": "endpoint" } ], "type": "tree" }, { "documentation": "region is set, bucket is not", "conditions": [], "endpoint": { "url": "https://{Region}.{partitionResult#dnsSuffix}" }, "type": "endpoint" } ], "type": "tree" }, { "documentation": "fallback when region is unset", "conditions": [], "error": "Region must be set to resolve a valid endpoint", "type": "error" } ] }