-
Notifications
You must be signed in to change notification settings - Fork 33
[$100] Support M2M tokens #40
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
Comments
@imcaizheng you may pick it up if you are interested. |
There is a minor issue, when GET /taas-teams/:id with m2m token, it would fail with the following message: [2020-12-04T13:17:33.868Z] TeamService getTeam ERROR : cannot GET /v5/projects/111 (403) Beside that, other endpoints work well with m2m access. Will look into that issue later. |
Thanks, @imcaizheng. I think project service returns an error because it requires M2M token to have proper scopes |
@maxceem
Do you have any idea how to configure AUTH0 related parameters to get tokens that can access /v5/projects? |
Thanks for the details @imcaizheng. I would check If we have any good way of testing it. To configure AUTH0 token we would need to ask the Topcoder infrastructure team, so this may take some time. |
Contest https://www.topcoder.com/challenges/30156200 has been created for this ticket. |
Contest https://www.topcoder.com/challenges/30156200 has been updated - it has been assigned to aaron2017. |
@imcaizheng could you, please, let me know what secret did you use to sign the tokens in Postman file? |
Works great for me locally. Issue with getting the team by id should be resolved when we add scope |
@nkumar-topcoder I've resolved conflicts and merged to DEV for testing. |
@maxceem I guess you already found out the secret is |
It has been tested e2e, and Connect App (using Projects API) creates Jobs in TaaS API using M2M token and it works great. Thanks, @imcaizheng. |
Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30156200 |
We need to allow calling TaaS API using M2M tokens.
We can follow Challenge API as an example for implementation https://github.com/topcoder-platform/challenge-api/blob/develop/app-routes.js
We should be able to configs scopes per route like this https://github.com/topcoder-platform/challenge-api/blob/develop/src/routes.js#L20
Support and config scopes per entity:
read:taas-teams
read:taas-jobs
,create:taas-jobs
,delete:taas-jobs
,update:taas-jobs
,all:taas-jobs
read:taas-jobCandidates
,create:taas-jobCandidates
,delete:taas-jobCandidates
,update:taas-jobCandidates
,all:taas-jobCandidates
read:taas-resourceBookings
,create:taas-resourceBookings
,delete:taas-resourceBookings
,update:taas-resourceBookings
,all:taas-resourceBookings
The text was updated successfully, but these errors were encountered: