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

Rewrite authentication (and authorisation) logic #1798

Open
tomudding opened this issue Mar 23, 2024 · 1 comment · May be fixed by #1902
Open

Rewrite authentication (and authorisation) logic #1798

tomudding opened this issue Mar 23, 2024 · 1 comment · May be fixed by #1902
Assignees
Labels
For: Backend Module: Application For anything related to the Application module Module: Company For anything related to the Company module Module: User For anything related to the User module Type: Enhancement Type: Feature Type: Idea Type: Security

Comments

@tomudding
Copy link
Member

tomudding commented Mar 23, 2024

What would you like?

This a combination of several ideas I have had over the past few years. With the introduction of GEWIS/gewisdb#234 in GEWISDB we have a better idea of how we are supposed to do this.

The authentication flow is re-done to better account for the several "account" types that we have:

  • GEWIS user,
  • Company user, and
  • API user.

With this it means we can actually make a split between 401 and 403 errors. Part of GH-1124 can be done by already moving authentication to the route stack(s) (through auth_type as introduced in GEWIS/gewisdb#234). This can lead to the removal of the get(Company)UserIdentityOrThrowException() in the GenericAclService. Furthermore, we should move the IP range check partially towards our memcache (or a new redis instance).

This will include GH-1557 and will allow for more API functionalities in the future (e.g. GH-1046).

Why is this needed?

Simplification of our existing systems. Even with my 4+ years of experience with this codebase the authentication and authorisation aspects of it are the most difficult to work with/understand in my opinion.

Other information

When changing the API authentication, we will break any existing setup.

@tomudding
Copy link
Member Author

We have to be careful which routes we mark as requiring a login. For example, the course document download must always be accessible (so AUTH_NONE) for tueguest to work.

@tomudding tomudding linked a pull request Sep 20, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: Backend Module: Application For anything related to the Application module Module: Company For anything related to the Company module Module: User For anything related to the User module Type: Enhancement Type: Feature Type: Idea Type: Security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant