Kinto / kinto.js

An Offline-First JavaScript Client for Kinto.
http://kintojs.readthedocs.io/
Other
318 stars 72 forks source link

Add groups to users automatically via Oauth #1677 #2159

Open khanfarr opened 4 months ago

khanfarr commented 4 months ago

Implement Automatic OAuth Group Assignment

Summary:

This pull request resolves the laborious and prone to error manual assignment of user groups from Azure AD, which was brought up in Issue #1677. The suggested modifications automate the process of grouping users according to OAuth group claims that Azure AD provides at the time of user login.

Issue:

As it is, the program needs human interaction to assign user groups when it comes to access controls and permission management. This manual procedure takes a long time and is prone to mistakes, which could result in operational inefficiencies and security threats.

Solution:

With the help of this PR, the aim is that Pyramid application's `GroupAwareAuthenticationPolicy' will now be improved to automatically identify groups based on OAuth tokens and associate them with user sessions. With the help of this feature, group assignment is managed precisely and dynamically, reflecting user rights set up in Azure AD.

Changes Made:

  1. Updated GroupAwareAuthenticationPolicy
  1. Testing

Next Steps:

This was for a class project, and definitely a WIP. I'm still a student and still learning so I'm happy to work on this on the side with some guidance as I'm sure there is a lot more work to be done here!