Regex for Access Logs user-agent
Budget: $10 – $30 USD
I am looking for a developer to make regex for AWS S3 access logs.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/LogFormat.html#log-record-fields
Here is an example access log:
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be awsexamplebucket1 [06/Feb/2019:00:00:38 +0000] 192.0.2.3 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be 891CE47D2EXAMPLE REST.GET.LOGGING_STATUS - "GET /awsexamplebucket1?logging HTTP/1.1" 200 - 242 - 11 - "-" "S3Console/0.4" - 9vKBE6vMhrNiWHZmb2L0mXOcqPGzQOI5XLnCtZNPxev+Hf+7tpT6sxDwDty4LHBUOZJG96N1234= SigV2 ECDHE-RSA-AES128-GCM-SHA256 AuthHeader awsexamplebucket1.s3.us-west-1.amazonaws.com TLSV1.1
My roadblock is the User-agent field of the access logs which may or may not contain double quotes in its comment section.
ex: curl -v -H'User-Agent: this is not a test ("hello!")' "www.example.comsh?response-content-disposition=inline&X-Amz-Security-Token=<rest_of_the_query_str>
"this is not a test ("hello!")" - oYU39HZ49hlHFqLsLYdDkEf81TDeh/u2r3Nal7ZBJ6tseY2gPVVR/L/R7mFlN0pz02mqOKzMM7c= SigV4 ECDHE-RSA-AES128-GCM-SHA256 QueryString life360-data-requests.s3.us-east-1.amazonaws.com TLSv1.2 -
https://docs.aws.amazon.com/AmazonS3/latest/userguide/LogFormat.html#log-record-fields
Here is an example access log:
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be awsexamplebucket1 [06/Feb/2019:00:00:38 +0000] 192.0.2.3 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be 891CE47D2EXAMPLE REST.GET.LOGGING_STATUS - "GET /awsexamplebucket1?logging HTTP/1.1" 200 - 242 - 11 - "-" "S3Console/0.4" - 9vKBE6vMhrNiWHZmb2L0mXOcqPGzQOI5XLnCtZNPxev+Hf+7tpT6sxDwDty4LHBUOZJG96N1234= SigV2 ECDHE-RSA-AES128-GCM-SHA256 AuthHeader awsexamplebucket1.s3.us-west-1.amazonaws.com TLSV1.1
My roadblock is the User-agent field of the access logs which may or may not contain double quotes in its comment section.
ex: curl -v -H'User-Agent: this is not a test ("hello!")' "www.example.comsh?response-content-disposition=inline&X-Amz-Security-Token=<rest_of_the_query_str>
"this is not a test ("hello!")" - oYU39HZ49hlHFqLsLYdDkEf81TDeh/u2r3Nal7ZBJ6tseY2gPVVR/L/R7mFlN0pz02mqOKzMM7c= SigV4 ECDHE-RSA-AES128-GCM-SHA256 QueryString life360-data-requests.s3.us-east-1.amazonaws.com TLSv1.2 -
Related categories:
Regular Expressions