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
Unknown Object (File)
Tue, Mar 5, 9:23 PM
Unknown Object (File)
Mon, Mar 4, 3:00 AM
Unknown Object (File)
Mon, Mar 4, 2:59 AM
Unknown Object (File)
Mon, Mar 4, 2:59 AM
Unknown Object (File)
Feb 23 2024, 7:31 PM
Unknown Object (File)
Feb 23 2024, 7:03 PM
Unknown Object (File)
Feb 23 2024, 7:02 PM
Unknown Object (File)
Feb 23 2024, 6:25 PM
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
Lint Not Applicable
Unit
Tests Not Applicable

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