Welcome to Ragnar - Self Service Tool - Gitlab OAuth Integration. This is a series of contests that will require you to create a MEAN stack based application to allow topcoder members to authorize themselves to private repositories on Github and Gitlab. This is the fifth contest in the series.
We currently have an application that allows Topcoder to host private repositories on Github and add Topcoder members to the repository through a self sign up link.
We want to replicate the same with Gitlab as part of this contest. Only the endpoints are in scope. No User Interface is needed as part of this contest.
We have developed the following services for Gitlab:
Service that lists the
teamsgroups associated with a user
Service that adds a member to a
For this contest, you need to provide the following:
Update the existing endpoint to add users with role “Owner” - currently, it always assumes that the Github username is specified. Update it so that gitlab usernames can also be specified. Accept the platform as an additional attribute to associate the provided username with.
An http endpoint that allows a user to perform an OAuth based authentication with Gitlab. Check out the existing endpoint for Github and you can create a similar one for Gitlab.
Restrict the endpoint which lists the
teamsgroups associated with a user to be only called by “Owners” of our app.
We have an endpoint that generates a unique URL for each team on Github. Verify that this works for Gitlab based
teamsgroups as well. Otherwise, update the same endpoint to work with Gitlab based teamsgroups too.
Visiting the URL generated will first ask the user to authenticate themselves using OAuth, which on success will add the authenticated user to the team associated with the endpoint. It will use the access token saved earlier belonging to the owner of the team to add the member. Now, this works only for Github based teams. Ensure that this works for Gitlab based
Note that the current front end exists only for Github. For this contest, you will not update the UI. You will provide all the remaining endpoints though to update the UI in the next contest.
Point to Note
We will share an existing code base with you in the contest forum. Update it with the requirements from above.
Update existing POSTMAN collection as necessary and provide new endpoints
You need to make use of Topcoder’s own eslint configuration
Provide mocha tests along with chai.
There are two OAuth based authentications at play - one of the
teamgroup owner and one of the member being added to the teamgroup. Storing the necessary details in the MongoDB database needs to be handled properly. Additionally, you need to restrict endpoints based on the role of the authenticated user in the app itself (set by the admin). These are the major requirements for this contest that you need to get right.
Please follow the same conventions used in the Gitlab service. DO NOT use any gitlab libraries (the service does not make use of any).
Don’t make any changes to the UI.
In some cases, you don’t have to create new endpoints but instead update the existing ones. Carefully implement this.
Final Submission Guidelines
Zip your changes. Update the existing README file with deployment and usage instructions if needed. Upload it to Topcoder. The winner will be asked to create a Pull Request to our repository.