DataFed icon indicating copy to clipboard operation
DataFed copied to clipboard

[Core, Auth] Implement First Version of Rust Backend for Device Authorization Flow and Token Validation

Open nedvedba opened this issue 5 months ago • 1 comments

Description

The plan for beginning the new Rust backend is to implement it as a thin auth API to support the device authorization flow for the Python API. The auth flow will be done entirely with the Rust API, and at the end the python API will be given a refresh/access token that it can provide to the Core API. This means the Python API will need to be able to perform token refresh, and handle the storage of its own tokens. Finally, the Rust API must provide an endpoint to verify the tokens for the Core API. Below is a diagram of what this architecture will look like.

Image

Acceptance Criteria

  • [ ] Rust backend is added to the project and does not interfere with the other components.
  • [ ] Rust API supports device authorization flow
  • [ ] Rust API has a token validate endpoint

Resources (optional):

  • https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-device-code

nedvedba avatar Aug 14 '25 14:08 nedvedba

  • Currently setting up the API - library likes self documents. Generates an openapi spec for you. https://crates.io/crates/utoipa

JoshuaSBrown avatar Aug 19 '25 20:08 JoshuaSBrown