Soprano omnimsg contract + provider-token (oauth2 / managed-identity) auth - #4
Open
Hou (SciencePotato) wants to merge 5 commits into
Open
Soprano omnimsg contract + provider-token (oauth2 / managed-identity) auth#4Hou (SciencePotato) wants to merge 5 commits into
Hou (SciencePotato) wants to merge 5 commits into
Conversation
added 5 commits
August 28, 2026 13:07
One endpoint for every channel: POST {base}/messages/omnimsg with text/destination/messageTypes/correlationId/shutterMode. Soprano renders voice TTS from the same text, so the text2voice block and the provisioned-source fields go away; destination is E.164 without the leading +. SOPRANO_SHUTTER_MODE opts into Soprano-side shutter for connectivity tests.
QA4 answers 201 with status FILTERED when an account/destination filter stops delivery, on both the omnimsg and the legacy per-channel path. Pin it instead of leaning on the fail-closed default.
Adds an omnimsg payload test per language (endpoint, messageTypes, destination without the leading +, passcode in text) - the rewrite previously rode on suites that never asserted the new shape. Makes the .NET destination null-safe like the other two, and strips every leading + in JavaScript so all three agree. Documents SOPRANO_SHUTTER_MODE as diagnostics-only, since a 2xx with a matching nonce stops SAS falling back, and records that Soprano voice ignores locale.
Two deviations from the CYOT endpoint contract. The type field was parsed and logged but never validated, so a future contract version would have been interpreted as v1; it is now pinned per language. ttlSeconds <= 0 was logged and delivered anyway, which spends a message on a code that can no longer authenticate; all three now return 400 and dispatch nothing. CONTRACT.md said the old behaviour was intended, so it is corrected alongside.
… federation) Mint an app-only Entra JWT for the provider API (issuer our app, audience the provider app) and send it as a Bearer token, selectable via EPP_PROVIDER_AUTH_MODE=oauth2. EPP_PROVIDER_MI_CLIENT_ID enables secretless workload-identity federation; otherwise a client secret is used. Consistent across JavaScript, Python and .NET, with tests.
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.
Summary
Adds Soprano's
omnimsgdelivery contract and provider-token (Entra JWT) auth across all three samples (JavaScript, Python, .NET), rebased cleanly ontomain.Changes
/messages/omnimsg: single endpoint for SMS and voice viamessageTypes;FILTEREDmapped toFail; null-safe destination; shutter-mode diagnostics note.type; refuse an expired passcode (ttlSeconds <= 0).Bearertoken — never the caller's inbound token.EPP_PROVIDER_AUTH_MODE=oauth2.EPP_PROVIDER_MI_CLIENT_IDenables secretless workload-identity federation (managed identity federated on our app); otherwise a client secret is used.EPP_PROVIDER_CLIENT_ID), authority = provider tenant (EPP_PROVIDER_TENANT_ID), audience = provider app (EPP_PROVIDER_SCOPE).docs/local.settings.sample.jsoncontract updated.Tests