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, Nov 5, 10:09 PM
Unknown Object (File)
Mon, Nov 4, 10:51 AM
Unknown Object (File)
Mon, Nov 4, 10:51 AM
Unknown Object (File)
Mon, Nov 4, 10:51 AM
Unknown Object (File)
Fri, Nov 1, 3:20 AM
Unknown Object (File)
Fri, Nov 1, 3:20 AM
Unknown Object (File)
Sat, Oct 26, 7:21 PM
Unknown Object (File)
Mon, Oct 14, 9:44 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
Branch
jonringer/refresh-keys
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