You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by hemantsharma90 December 23, 2024
Hello Team,
We wanted to understand the user management aspects(CRUD Operations of Users) in the Git-Proxy Application
viz.
Registering/Managing Admin Role Users,
Registering /Managing Contributor Role Users,
Registering /Managing Reviewer Role Users.
Didn’t found any documented process to do User Registration(maintaining passwords etc) in the gitproxy documentation.
From the source code of the application , got a fair bit of understanding that we could actually add users by updating [filename: './.data/db/users.db'] , though we reckon there is a much cleaner approach to do the same (which I might be missing while deciphering the source code 😊 ).P.S - I'm not an expert in NodeJS constructs.
Though we can add an approved github/gitlab repository from the ADMIN UI of Git Proxy, and actually can associate registered users as Reviewers/ Contributors for the respective repositories.
So just refreshed my memory - In a typical setup with Mongo for db and LDAP for auth, when the user first logs in the following happens.
Check the users account is in 'users' LDAP group - f
If the users account is in the LDAP group, an upsert operation is performed against the DB (so if they exist their record is updated in the DB, if they do not exist a new record is created)
The isAdmin flag comes from an LDAP check to see if the user is in the admin LDAP group
// Now check if the user is an adminconstisAdmin=awaitldaphelper.isUserInAdGroup(profile.username,domain,adminGroup);profile.admin=isAdmin;console.log(`passport.activeDirectory: ${profile.username} admin=${isAdmin}`);constuser={username: profile.username,admin: isAdmin,email: profile._json.mail,displayName: profile.displayName,title: profile._json.title,};awaitdb.updateUser(user);
The 'local' authentication with the database file is intended for development / local running only - I believe there was a little helper function somewhere to insert users into the local db.
Discussed in #856
Originally posted by hemantsharma90 December 23, 2024
Hello Team,
We wanted to understand the user management aspects(CRUD Operations of Users) in the Git-Proxy Application
viz.
Registering/Managing Admin Role Users,
Registering /Managing Contributor Role Users,
Registering /Managing Reviewer Role Users.
Didn’t found any documented process to do User Registration(maintaining passwords etc) in the gitproxy documentation.
https://git-proxy.finos.org/docs/.
From the source code of the application , got a fair bit of understanding that we could actually add users by updating [filename: './.data/db/users.db'] , though we reckon there is a much cleaner approach to do the same (which I might be missing while deciphering the source code 😊 ).P.S - I'm not an expert in NodeJS constructs.
Though we can add an approved github/gitlab repository from the ADMIN UI of Git Proxy, and actually can associate registered users as Reviewers/ Contributors for the respective repositories.
#57
However to register a user in the first place is something we want to understand.
Regards,
Hemant Sharma
The text was updated successfully, but these errors were encountered: