Organize device inventory by customer and restrict token access to its audience
This commit is contained in:
@@ -6,10 +6,12 @@ mod agent_update_health;
|
||||
mod agent_update_policy;
|
||||
mod agent_updates;
|
||||
mod api;
|
||||
mod devices;
|
||||
mod artifact_store;
|
||||
mod auth;
|
||||
mod local_auth;
|
||||
mod mcp_tokens;
|
||||
mod customers;
|
||||
mod catalog;
|
||||
mod checkpoint_repair;
|
||||
mod controls;
|
||||
@@ -208,9 +210,11 @@ async fn main() -> Result<()> {
|
||||
.route("/auth/session", get(auth::session))
|
||||
.route("/auth/logout", post(auth::logout))
|
||||
.route("/api/v1/job-signing-key", get(api::job_signing_key))
|
||||
.route("/api/v1/tenants", get(api::tenants))
|
||||
.route("/api/v1/tenants/{tenant}/devices", get(api::devices_page))
|
||||
.route("/api/v1/tenants/{tenant}/devices/{asset}", get(api::device));
|
||||
.route("/api/v1/tenants", get(api::tenants).post(customers::create))
|
||||
.route("/api/v1/tenants/{tenant}", axum::routing::patch(customers::rename))
|
||||
.route("/api/v1/devices", get(devices::all))
|
||||
.route("/api/v1/tenants/{tenant}/devices", get(devices::page))
|
||||
.route("/api/v1/tenants/{tenant}/devices/{asset}", get(devices::detail));
|
||||
routes = mcp_tokens::routes(routes);
|
||||
routes = routes.route("/auth/local/login", post(auth::local_login));
|
||||
routes = jobs::routes(routes);
|
||||
|
||||
Reference in New Issue
Block a user