Page MenuHomePhabricator

[services][identity] helper function to start pake login
AbandonedPublic

Authored by varun on May 27 2022, 11:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 9, 6:21 PM
Unknown Object (File)
Thu, May 9, 6:21 PM
Unknown Object (File)
Thu, May 9, 6:21 PM
Unknown Object (File)
Thu, May 9, 6:21 PM
Unknown Object (File)
Wed, May 1, 5:24 PM
Unknown Object (File)
Tue, Apr 23, 7:43 PM
Unknown Object (File)
Tue, Apr 23, 7:43 PM
Unknown Object (File)
Tue, Apr 23, 7:42 PM

Details

Summary

Use pake_credential_request bytes to start PAKE login process. Return error if registration data is not found in DDB. If successful, return a ServerLoginStartResult that contains the message to return to the client.

Depends on D4146

Test Plan

will test this with the subsequent diff

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

This revision is now accepted and ready to land.May 30 2022, 2:08 AM
This revision now requires review to proceed.May 30 2022, 2:11 AM
tomek added inline comments.
services/identity/src/service.rs
121–122

This deserialization is only necessary when server_registration != None, so maybe it is a good idea to move it to Some(registration) arm?

jim requested changes to this revision.Jun 6 2022, 9:21 AM
jim added inline comments.
services/identity/src/service.rs
116

&[u8], not &Vec<u8>

124

This should be checked right after getting the registration instead of doing request deserialization in between. In breaks the logical flow of the code in a weird way

Try:

let server_registration = self.client.get_pake_registration(user_id).await?
  .ok_or(Error::MissingRegistration)?;
This revision now requires changes to proceed.Jun 6 2022, 9:21 AM