deserialization issue affecting APIGatewayCustomAuthorizerContext
- Vorherrschende Sprache
- C#
- Sterne
- 1.7k
- Forks
- 503
- Ø Merge
- 1 T. 18 Std.
- Gemergte PRs (30 T.)
- 21
Beschreibung
### Describe the bug
Not able to consume values returned by a Lambda Authorizer; they are not there even if they are present in the input JSON
### Expected Behavior
Dictionary properly set with keys and values
### Current Behavior
No values
### Reproduction Steps
Websocket API with an authorizer; try to access any authorizer context property (like principalId)
Use the new "Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer" (which is default)
### Possible Solution
As a workaround, the old "Amazon.Lambda.Serialization.Json.JsonSerializer" using the Newtonsoft library seems to work just fine.
### Additional Information/Context
using Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer
"Authorizer": {
"principalId": {
"ValueKind": 3
},
"integrationLatency": {
"ValueKind": 4
},
"authn": {
"ValueKind": 3
}
}
using the legacy Amazon.Lambda.Serialization.Json.JsonSerializer
"Authorizer": {
"principalId": "***********************",
"integrationLatency": 9516,
"authn": "None"
},
### AWS .NET SDK and/or Package version used
Amazon.Lambda.Serialization.SystemTextJson v2.3.0
### Targeted .NET Platform
.net core 3.1
### Operating System and version
any
Beitragsleitfaden
Rechercherichtung
Beginnen Sie damit, den WebSocket API authorizer-Fall mit Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer v2.3.0 zu reproduzieren, und vergleichen Sie anschließend dessen APIGatewayCustomAuthorizerContext-Ausgabe mit dem Legacy JsonSerializer. Verfolgen Sie die Deserialisierung des Authorizer-Wörterbuchs und bestätigen Sie, dass principalId, integrationLatency, authn und andere zurückgegebene Werte erhalten bleiben; in dem Bericht wird keine Quelldatei und kein Test genannt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, csharp
- Bereich
- api, backend, cloud
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100