Skip to content

feat: include X-Protocol-Version header in PassportHttpClient requests - #1537

Open
aanorbel wants to merge 4 commits into
mainfrom
issue/OOPRIV-67
Open

feat: include X-Protocol-Version header in PassportHttpClient requests#1537
aanorbel wants to merge 4 commits into
mainfrom
issue/OOPRIV-67

Conversation

@aanorbel

Copy link
Copy Markdown
Member

Related to OOPRIV-67

@aanorbel
aanorbel requested review from DecFox, LDiazN and sdsantos August 20, 2026 09:58

@DecFox DecFox left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@LDiazN LDiazN left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

passportAuthRegister = passportBridge::userAuthRegister,
passportAuthSubmit = passportBridge::userAuthSubmit,
getProxyOption = proxyManager::selected,
getProtocolVersion = { getManifest().map { it?.meta?.protocolVersion } },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this getting the protocol version from the manifest? I think the one we want to deliver here is the protocol version currently running in the app, example of how this is done in the Python bindings: https://github.com/ooni/userauth/blob/cae34f0813f171fb941ac9514e088402d4cb276e/ooniauth-py/src/protocol.rs#L42-L47

It probably has to be exposed by the passport library but @mehul can confirm this. If not exposed we can assume "0.1.0" as that's the only version there is now

The idea is to get the protocol version running on the app to route them to different versions of the backend in case they are running a soon-to-deprecate version

The manifest is not a good proxy for this because the version there is what was reported by the backend and it can get updated

@aanorbel
aanorbel requested a review from LDiazN August 24, 2026 08:58
@aanorbel
aanorbel marked this pull request as draft August 24, 2026 09:11
@aanorbel
aanorbel requested a review from DecFox August 25, 2026 10:56
@aanorbel
aanorbel marked this pull request as ready for review August 25, 2026 10:56
@aanorbel
aanorbel requested a review from LDiazN August 25, 2026 12:11

@DecFox DecFox left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants