Skip to content

Commit e87ccb5

Browse files
committed
refactor(parser): uses example ID and access tokens that are Git-safe
1 parent edaf657 commit e87ccb5

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

.gitleaksignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
examples/batch_processing/src/context_manager_access_output_pydantic.txt:aws-access-token:10
22
examples/batch_processing/src/context_manager_access_output_pydantic.txt:aws-access-token:15
33
examples/batch_processing/src/context_manager_access_output.txt:aws-access-token:10
4-
aws_lambda_powertools/utilities/parser/models/s3.py:aws-access-token:32
5-
aws_lambda_powertools/utilities/parser/models/s3.py:aws-access-token:34
6-
aws_lambda_powertools/utilities/parser/models/s3.py:aws-access-token:70
7-
aws_lambda_powertools/utilities/parser/models/s3.py:aws-access-token:345
8-
aws_lambda_powertools/utilities/parser/models/s3.py:aws-access-token:393
9-
aws_lambda_powertools/utilities/parser/models/s3.py:aws-access-token:463
10-
aws_lambda_powertools/utilities/parser/models/s3.py:generic-api-key:345

aws_lambda_powertools/utilities/parser/models/s3.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ class S3EventRecordGlacierEventData(BaseModel):
4343
class S3Identity(BaseModel):
4444
principalId: str = Field(
4545
description="Amazon identifier of the user, role, account or services who caused the event.",
46-
examples=[
47-
"AIDAJDPLRKLG7UEXAMPLE",
48-
"A1YQ72UWCM96UF",
49-
"AWS:AIDAINPONIXQXHT3IKHL2",
50-
],
46+
examples=["AIDAJEXAMPLE1234"],
5147
)
5248

5349

@@ -88,7 +84,7 @@ class S3OwnerIdentify(BaseModel):
8884
examples=[
8985
"A3I5XTEXAMAI3E",
9086
"A1YQ72UWCM96UF",
91-
"AWS:AIDAINPONIXQXHT3IKHL2",
87+
"AWS:AIDAJEXAMPLE1234",
9288
],
9389
)
9490

@@ -405,7 +401,7 @@ class S3RecordModel(BaseModel):
405401
)
406402
userIdentity: S3Identity = Field(
407403
description="Amazon identifier of the user, role, account or services who caused the event.",
408-
examples=[{"principalId": "AWS:AIDAINPONIXQXHT3IKHL2"}],
404+
examples=[{"principalId": "AWS:AIDAJEXAMPLE1234"}],
409405
)
410406
requestParameters: S3RequestParameters = Field(
411407
description="Source IP address of the request.",
@@ -475,7 +471,7 @@ class S3Model(BaseModel):
475471
"awsRegion": "us-east-2",
476472
"eventTime": "2019-09-03T19:37:27.192Z",
477473
"eventName": "ObjectCreated:Put",
478-
"userIdentity": {"principalId": "AWS:AIDAINPONIXQXHT3IKHL2"},
474+
"userIdentity": {"principalId": "AWS:AIDAJEXAMPLE1234"},
479475
"requestParameters": {"sourceIPAddress": "255.255.255.255"},
480476
"responseElements": {
481477
"x-amz-request-id": "D82B88E5F771F645",

0 commit comments

Comments
 (0)