Page MenuHomePhabricator

[Identity] Refactor access token verification to be more usable
ClosedPublic

Authored by jon on Jun 5 2023, 7:34 AM.
Tags
None
Referenced Files
F1674605: D8094.diff
Sun, Apr 28, 4:34 PM
Unknown Object (File)
Sat, Apr 27, 9:32 AM
Unknown Object (File)
Thu, Apr 18, 2:44 AM
Unknown Object (File)
Thu, Apr 18, 2:44 AM
Unknown Object (File)
Thu, Apr 18, 2:44 AM
Unknown Object (File)
Thu, Apr 18, 2:44 AM
Unknown Object (File)
Thu, Apr 18, 2:44 AM
Unknown Object (File)
Thu, Apr 18, 2:39 AM
Subscribers

Details

Summary

Verifying if an access token is valid will be a common
action with many of the API calls. We should make this as ergonomic
as possible.

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

Test Plan

Set up identity service and localstack

nix develop

(cd services/identity && RUST_LOG=debug cargo run -- server)
(cd services/commtest && cargo test --test identity_access_tokens_tests)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Allow test to run multiple times without failing

This revision is now accepted and ready to land.Jun 5 2023, 10:01 PM
This revision now requires review to proceed.Jun 6 2023, 10:43 AM
varun added inline comments.
services/commtest/tests/identity_access_tokens_tests.rs
28 ↗(On Diff #27444)

might be worth adding a comment above this line explaining that the device ID is the primary ed25519 public key from the above payload

This revision is now accepted and ready to land.Jun 6 2023, 11:54 AM