MON-4025 add caas split get transactions#164
Merged
Merged
Conversation
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.
Description
Adds the
caas:transaction_splits:readscope to thecaasGetTransactionsrequest so transaction splits are returned byGET /transactions.The mh-api-gateway only includes the
splitsarray when the access token carriescaas:transaction_splits:read. Previously the SDK requested onlycaas:transactions:read, so splits were always stripped from the response. The request now asks for both scopes. The client-credentials grant filters requested scopes against the client's allow-list and silently drops any it is not registered for, so clients with the splits scope receivesplitsand clients without it are unaffected (no grant failure, just no splits). No separate method is introduced and the public API surface is unchanged.Screenshots, Recordings
This PR includes:
Added config changes?
Added database migrations/resources (db, collection, table, column)?
Are there any post deployment tasks that need to be performed?
Clients that need splits returned must be registered for the
caas:transaction_splits:readscope in identity. No change is required for clients that do not use splits.Note
Low Risk
Narrow OAuth scope change on an existing CAAS read call with no API signature change; unregistered clients should be unaffected by scope filtering at token grant.
Overview
caasGetTransactionsnow requestscaas:transactions:readandcaas:transaction_splits:readon the client-credentials grant (previously only transactions read). The gateway only returns asplitsarray when the token includes the splits scope, so this fixes split data being omitted for clients that are allowed that scope.The public method signature is unchanged. Clients not registered for
caas:transaction_splits:readshould still get tokens without that scope (filtered at grant time) and behave as before. The readmecaasGetTransactionssection documents both scopes and whensplitsappear.Reviewed by Cursor Bugbot for commit b0d2ece. Bugbot is set up for automated code reviews on this repo. Configure here.