Repository navigation
docs(data_classes): correct AppSync identity docstring for OPENID_CONNECT and pin the dispatch - #8705
Open
ShussMiao wants to merge 1 commit into
Conversation
…ty dispatch `AppSyncEventBase.identity` documented OPENID_CONNECT as returning None, but `get_identity_object` only returns None when the identity mapping itself is None, so an OIDC identity (which always carries `sub`) resolves to `AppSyncIdentityCognito` — which already models the OIDC fields. The existing test suite already asserted that; the docstring was the outlier. Corrects the line, drops the two `NEED TO TEST` notes for the case that is now settled, and adds tests pinning the dispatch so docstring and behaviour cannot drift apart again. `AWS_LAMBDA` is left as explicitly unverified rather than guessed at, since its mapping is whatever the authorizer returns. Signed-off-by: ShussMiao <168898188+ShussMiao@users.noreply.github.com>
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issue number: closes #8704
Summary
Changes
AppSyncEventBase.identitydocumentedOPENID_CONNECTas returningNone. It cannot:get_identity_objectreturnsNoneonly when the identity mapping itself isNone, and an OIDC identity always carriessub, so it resolves toAppSyncIdentityCognito— the class that already exposes the OIDC fields (claims,issuer,groups,default_auth_strategy).The existing suite already relied on this:
test_appsync_resolver_event.py:48assertsisinstance(parsed_event.identity, AppSyncIdentityCognito)forappSyncResolverEvent.json, whose identity is OIDC-shaped. The docstring was the outlier, and carried aNEED TO TESTnote.OPENID_CONNECTline and removes itsNEED TO TESTnote.type of identify found→type of identity found).AppSyncIdentityCognitowith its fields reachable, and "only aNoneidentity maps toNone".AWS_LAMBDAexplicitly marked unverified rather than guessing, since its mapping is whatever the authorizer returns and there is no fixture for it.User experience
No behavioural change — the docstring now matches what already happens, so anyone reading
identityto decide which class to expect for an OIDC-authorized API no longer gets told it will beNone.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.