You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incomplete and/or missing API Gateway Lambda Authorizer events #407
Also, upon testing this manually, I see the following is also sent by API Gateway though not documented:
interfaceUndocumented{multiValueHeaders: Record<string,string[]>;multiValueQueryStringParameters: Record<string,string[]>;requestContext: {extendedRequestId: string;requestTime: string;// e.g. "19/Jan/2023:21:13:26 +0000"protocol: string;// e.g. "HTTP/1.1"domainPrefix: string;requestTimeEpoch: number;// e.g. 1674162806345identity: {// in my testing API Gateway sent `null` to the fields with `unknown` type. So I don't know for surecognitoIdentityPoolId: unknown;// likely `string`accountId: unknown;// likely `string`cognitoIdentityId: unknown;// likely `string`caller: unknown;// likely `string`principalOrgId: unknown;// likely `string`accessKey: unknown;// likely `string`cognitoAuthenticationType: unknown;// likely `string`cognitoAuthenticationProvider: unknown;// likely `string`userArn: unknown;// likely `string`userAgent: string;user: string;}}}
In my opinion, the undocumented fields should be added too, so developers can take advantage of them. In particular $.requestContext.extendedRequestId is critical since it's the only field that provides end-to-end request tracing as clients can override the $.requestContext.requestId value by specifying the x-amzn-requestid header on their HTTP requests.
changed the title [-]Incomplete and missing API Gateway Lambda Authorizer events[/-][+]Incomplete and/or missing API Gateway Lambda Authorizer events[/+]on Mar 2, 2023
Activity
marcogrcr commentedon Mar 2, 2023
API Gateway REST API (
TOKEN)The equivalent
classis:aws-lambda-java-libs/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayCustomAuthorizerEvent.java
Line 19 in cd30dc5
Even though, this event is for API Gateway HTTP API (
1.0), it contains a superset of the fields, so this class can be used here.marcogrcr commentedon Mar 2, 2023
API Gateway REST API (
REQUEST)The equivalent
classis:aws-lambda-java-libs/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayCustomAuthorizerEvent.java
Line 19 in cd30dc5
Even though, this event is for API Gateway HTTP API (
1.0), which contains a superset of the fields, it's missing the following:Also, upon testing this manually, I see the following is also sent by API Gateway though not documented:
In my opinion, the undocumented fields should be added too, so developers can take advantage of them. In particular
$.requestContext.extendedRequestIdis critical since it's the only field that provides end-to-end request tracing as clients can override the$.requestContext.requestIdvalue by specifying thex-amzn-requestidheader on their HTTP requests.marcogrcr commentedon Mar 2, 2023
API Gateway HTTP API (
1.0)The equivalent
classis:aws-lambda-java-libs/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayCustomAuthorizerEvent.java
Line 19 in cd30dc5
Which is missing the following:
marcogrcr commentedon Mar 2, 2023
API Gateway HTTP API (
2.0)The equivalent
classis:aws-lambda-java-libs/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayV2CustomAuthorizerEvent.java
Line 24 in cd30dc5
Which is missing the following:
marcogrcr commentedon Mar 2, 2023
API Gateway WebSocket API
There is no equivalent
classfor this event type. The closest one is:aws-lambda-java-libs/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayCustomAuthorizerEvent.java
Line 19 in cd30dc5
But it's missing the following:
After performing a manual test, I believe the following class should be created to address this gap:
[-]Incomplete and missing API Gateway Lambda Authorizer events[/-][+]Incomplete and/or missing API Gateway Lambda Authorizer events[/+]