Page MenuHomePhabricator

[Identity] Implment update_user endpoint on server
ClosedPublic

Authored by jon on Mar 2 2023, 2:10 PM.
Tags
None
Referenced Files
F3513662: D6939.diff
Sun, Dec 22, 1:17 AM
Unknown Object (File)
Fri, Dec 20, 12:41 AM
Unknown Object (File)
Fri, Dec 13, 10:09 PM
Unknown Object (File)
Nov 3 2024, 2:39 PM
Unknown Object (File)
Oct 26 2024, 9:10 AM
Unknown Object (File)
Oct 21 2024, 3:56 PM
Unknown Object (File)
Oct 20 2024, 6:34 PM
Unknown Object (File)
Oct 19 2024, 10:24 PM
Subscribers

Details

Summary

Most of the registration code was taken and adapted to
updating a user. A small amount of rust refinement was added to
make the code a bit more readable.

Updates the user's public signing key, password (registration_bundle),
and will issue a new access token.

Part of https://linear.app/comm/issue/ENG-2763

Depends on D6925

Test Plan

will be tested end-to-end in another diff

cd services/identity
cargo run -- server

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested changes to this revision.Mar 2 2023, 7:48 PM

looks mostly right, but we need to validate the existing access token before we allow an update, right?

This revision now requires changes to proceed.Mar 2 2023, 7:48 PM

We talked about the usage of access tokens, and decided that we can defer doing access_token validation when the client (not keyserver) is able to provide them.

please address the typos and import consolidation before landing, i'm fine with deferring the error logging/Status stuff and creating a linear task for it

services/identity/src/service/update.rs
21–25 ↗(On Diff #23438)

these imports can be combined

124 ↗(On Diff #23438)

receive, received

this typo is in a couple spots, so just make sure you grep for all of the instances

also we should log the error and return a vague one in the Status

138 ↗(On Diff #23438)

log the error, return a vague Status

This revision is now accepted and ready to land.Mar 3 2023, 3:04 PM

Apply error and typo feedback

jon added inline comments.
services/identity/src/service/update.rs
124 ↗(On Diff #23438)

pretty sure I'm getting dumber, or just care less about english's inconsistencies. Either way, thanks