Table of Contents |
---|
This page is for json schema properties of type "string" who may (or may not) need a regular expression to help define allowed instances.
Page will be organized into json schemas, and will list all "string" type properties, logical rules for defining those properties, if they need a pattern, and a suggested regular expression for the properties that do need a pattern.
...
Code Block |
---|
Suggested Regular Expression = "\\d{1,7}"
|
S3Token.json
path
Logical Rules
- should be "https://console.aws.amazon.com/s3/home"
Needs Pattern = yes
Code Block |
---|
Suggested Regular Expression = "https://console.aws.amazon.com/s3/home"
|
md5
Logical Rules
- needs to be 32 digits
- needs to be all a-f and 0-9
Needs Pattern = yes
Needs Pattern = yes
Code Block |
---|
Suggested Regular Expression = "^[a-fA-F0-9]{32}$"
|
contentType
Logical Rules
- This is not something from aws, but something from services
- is the MIME type
- "text/html" is one
- can also be application, audio, image, message, multipart, text, video, x-token
Needs Pattern = yes
Code Block |
---|
Suggested Regular Expression = "(text/html|application/html|audio/html|image/html|message/html|multipart/html|text/html|video/html|x-token/html)"
|
accessId
Logical Rules
- 20 characters
- all numbers and capitol letters (A-Z)
- no white spaces
- found on aws site can be between 16 to 32 characters, but I think I misinterpreted this
Needs Pattern = yes
Code Block |
---|
Suggested Regular Expression = "^[0-9A-Z]{20}$"
|
secretKey
Logical Rules
- letters, both lower and upper case
- A to Z
- numbers
- random characters like + and /
- 40 characters long
- no white spaces
Needs Pattern = yes
Code Block |
---|
Suggested Regular Expression = "^\\S{40}$"
|
securityToken
Logical Rules
- found two examples
- isfakeSessionToken
- AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/L
To6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3z
rkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtp
Z3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE - looks like these can vary in length
- one word, no whitespace
- allow numbers, letters, and random characters
Needs Pattern = yes
Code Block |
---|
Suggested Regular Expression = "\\S+"
|
bucket
Logical Rules
- naming rules for the buckets
- can contain lowercase letters, numbers, periods, underscores and dashes
- must start with a number or letter
- must be between 3 and 255 characters long
- must not be formatted as an ip address like 564.442.4.4
- ip issue not supported, tired several variations, including greedy
- the exact question is can it take x amount of characters and compare them against two semi-complex expressions
- having trouble finding example online
Needs Pattern = yes
Suggested Regular Expression
presignedUrl
Logical Rules
- generated example
- https://bucket.s3.amazonaws.com/key?Expires=1323383935&AWSAccessKeyId=AKIAJ32QSEKRO5UEMDWQ&Signature=4%2Fyjg%2FOdHNtBtmaM8PoGOqGfWTA%3D
- example from a test
- https://s3.amazonaws.com/devdata.sagebase.org/9876/unc.edu_COAD.AgilentG4502A_07_3.Level_2.2.0.0.tar.gz?Expires=1323468021&x-amz-security-token=fakeSessionToken&AWSAccessKeyId=fakeAccessKeyId&Signature=OuTEUoJklhzL37jFRX9pRK1RcVg%3D
- https://s3.amazonaws.com/devdata.sagebase.org/9876/unc.edu_COAD.AgilentG4502A_07_3.Level_2.2.0.0.tar.gz?Expires=1323468151&x-amz-security-token=fakeSessionToken&AWSAccessKeyId=fakeAccessKeyId&Signature=Jt1fXYZFO5e8pyKJ%2B%2B9YsFiFY6I%3D
Needs Pattern = yes
Suggested Regular Expression