Skip to content

mobile: Integrate new anon-creds lib to mobile apps #1149

@DecFox

Description

@DecFox

This issue describes the integration of the new anon-creds related endpoints using the rust library as a proxy for the API calls. The spec doc can be found here: https://docs.google.com/document/d/1weAHcXPJZGMOls35rg6sj-jDnuEcbHHucIkUCAwpgXo/edit?usp=sharing

The workflow for performing these operations are as follows:

  • Upon app launch (after onboarding), if the data is not already stored locally in the device, the probe shall:

    • request the current version of the manifest and store it locally
    • perform a request to userauth_register with the manifest public parameters and update/store the credential we get in the response
      If any of the above fail due to networking problems, the probe should re-attempt performing them on app load or prior to running tests.
  • When a measurement is run, instead of uploading it using the "normal" report endpoint the userauth_submit should be called together with the credentials of the user. If the credentials failed to be generated due to networking issues, the probe should failover to using the legacy measurement upload method (eventually we should probably cache them and re-attempt upload later similar to network failures in measurement upload now).

The rust code makes use of uniffi to generate kotlin/swift bindings to be exposed to the app. The udl spec for the same can be found here: https://github.com/ooni/ooniprobe-rs/blob/900c3760d241ec0457a4af4f10665a16e80df131/ooniprobe-ffi/src/ooniprobe.udl. The function calls to integrate for anonymous credentials are:

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions