To ensure only authorized users can access the metrics endpoint, we need to leverage the existing ProtectedRoutes.tsx component. This may require refactoring to restrict access exclusively to users logged in with a mobilitydata.org account.
Tasks:
Review the current implementation of ProtectedRoutes.tsx to assess if any modifications are needed to handle this specific case.
Update or refactor ProtectedRoutes.tsx to block access to the metrics endpoint for users who are either:
Not logged in.
Logged in with an account that is not under the mobilitydata.org domain.
Test to ensure unauthorized users cannot access the metrics endpoint and confirm that authorized users (with valid mobilitydata.org accounts) retain full access.
Outcome:
The metrics endpoint should only be accessible to logged-in users with a mobilitydata.org account, with proper access controls enforced through ProtectedRoutes.tsx.
To ensure only authorized users can access the metrics endpoint, we need to leverage the existing
ProtectedRoutes.tsx
component. This may require refactoring to restrict access exclusively to users logged in with amobilitydata.org
account.Tasks:
ProtectedRoutes.tsx
to assess if any modifications are needed to handle this specific case.ProtectedRoutes.tsx
to block access to the metrics endpoint for users who are either:mobilitydata.org
domain.mobilitydata.org
accounts) retain full access.Outcome: The metrics endpoint should only be accessible to logged-in users with a
mobilitydata.org
account, with proper access controls enforced throughProtectedRoutes.tsx
.