Skip to content

Authorization: Add [Authorize] flag to restricted endpoints #96

Closed

Description

@reduan-azouaghe

What and why

Proper authorization is critical for ensuring that only authenticated users can access protected resources and perform sensitive operations. Without it, unauthorized users could potentially read, modify, or delete data that should be secured.

Currently, very few endpoints that should be restricted are actually protected by authorization. This creates a security vulnerability and weakens trust in the system.

Suggestion

Add the [Authorize] attribute to all endpoints except:

  • POST /login/ -> Login endpoint
  • POST /users/ -> Public registration end-point
  • POST /validation/ -> Validate password end-point
  • GET /validation/ -> Validate end-point

Progress

Benefits

  • Prevents unauthorized access to sensitive operations.
  • Strengthens the overall security of the API.
  • Establishes a clear, consistent standard for authorization across the back-end.

Activity

  1. otvegg commented on Sep 18, 2025

    @otvegg
    Contributor

    Any tests that tests those endpoints would also need to be adjusted to have a valid token with an user with appropriate permissions for the action, e.g. if the test is intended to fail it should be for example a student trying to do a teacher action.

  2. moved this from Under Design to Backlog in EX-Team 3 Dev Board - 2508on Sep 22, 2025
  3. moved this from Backlog to Todo in EX-Team 3 Dev Board - 2508on Sep 22, 2025
  4. added a commit that references this issue on Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or request

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions