Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve access restriction to metrics endpoint #730

Open
cka-y opened this issue Sep 6, 2024 · 0 comments
Open

Improve access restriction to metrics endpoint #730

cka-y opened this issue Sep 6, 2024 · 0 comments

Comments

@cka-y
Copy link
Contributor

cka-y commented Sep 6, 2024

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:

  1. Review the current implementation of ProtectedRoutes.tsx to assess if any modifications are needed to handle this specific case.
  2. 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.
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant