Repository navigation
fix(data-classes,parser): read VPC Lattice v2 x509 identity fields with the casing AWS sends - #8628
Conversation
|
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks @LuisFigueroaG, third one from you this cycle! I checked the V2 event in the VPC Lattice docs and the five fields are indeed lower-case x509…, so only san_dns could ever work. Ran the data classes and parser suites and probed both casings, all good. Approving, this goes out in 3.38.0, no need to rebase, I'll handle it and you'll get the credit in the release notes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8628 +/- ##
========================================
Coverage 96.93% 96.93%
========================================
Files 318 318
Lines 16031 16031
Branches 1423 1423
========================================
Hits 15540 15540
Misses 349 349
Partials 142 142 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
05877b2
into
aws-powertools:develop



Issue number: closes #8627
Summary
Changes
VPC Lattice sends the Roles Anywhere certificate fields in
requestContext.identityin camelCase (x509IssuerOu,x509SanDns,x509SanNameCn,x509SanUri,x509SubjectCn), butvpcLatticeEventV2IdentityandVpcLatticeV2RequestContextIdentitylooked up four of them with a capitalX. Onlyx509_san_dnsused the right key.This changes the keys in the data class and the aliases in the parser model to match the V2 event structure, and adds a test for each that sets all five fields. Both tests fail on
develop.User experience
Before:
x509_subject_cn,x509_issuer_ou,x509_san_uriandx509_san_name_cnwere alwaysNonefor requests authenticated with IAM Roles Anywhere.After: they return the values VPC Lattice sends. Test events that used the capitalized keys no longer populate these fields, since those keys don't match what the service sends.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.