-
Notifications
You must be signed in to change notification settings - Fork 56
Support standard M2M scopes #483
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
we will analyze and prioritize it. |
Hi @vikasrohit , we're entering dev test phase for about the next 3 weeks. I'd appreciate if we could get this implemented soon in dev, so the production push of this could go in step with the challenge v5 api launch slated for the end of March. I don't want v5 going live with the all:connect_project scope if possible. |
Sure @rootelement we will try to prioritize it. @maxceem @rootelement can we add more details to what we expect (in terms of permissions) when these new scopes are associated with a m2m token? I mean |
@vikasrohit as I understand M2M should get the same level of access as admin users, so:
|
@maxceem is correct. This is a Machine to Machine token, so it will only be provisioned for our services to communicate. There's no "user" here. So what he has listed above is correct. |
@vikasrohit should we keep support for the current scope |
Okay, thanks for the updates @maxceem and @rootelement
That is something I was going to ask next. |
Make sure that we support M2M for inviting users and accepting an invitation, so we can add a member using these 2 calls using M2M: curl 'https://api.topcoder-dev.com/v5/projects/8967/invites' \
-H 'authorization: Bearer <ADMIN_TOKEN>' \
-H 'content-type: application/json' \
--data '{"handles":["maxceem"],"role":"customer"}' accept the invite on behalf of the user curl 'https://api.topcoder-dev.com/v5/projects/8967/invites/<inviteId>' \
-X PATCH \
-H 'authorization: Bearer <ADMIN_TOKEN>' \
-H 'content-type: application/json' \
--data '{"status":"accepted"}' |
As per the clarification from James on Slack:
We would not support FYI @vikasrohit |
@maxceem lets create new scope Also, for
While this 2 calls based approach would also be okay, but I think when we are using the m2m, we can allow m2m callers to directly add members without any invite. We might create a special scope for handling this so that we know who all can add members to a project directly. Do you see any problem with that approach? |
No, it looks good to me.
Should it be Should we also let Topcoder Admins add any member directly? or only for M2M? |
I think we have to create separate scopes for separate resources, I guess and project member is a separate resource. Even thought it is returned right now with |
@vikasrohit from the comments 1 and 2 it looks like for the MANAGE_TOPCODER_TEAM_INVITES: {
projectRoles: ['manager', 'account_manager'],
topcoderRoles: ['administrator', 'Connect Manager'],
scopes: ['all:project', 'write:project']
} PS: I've just got your new comment. Will think about it... |
I only have concerns regarding requiring both scopes. What if we require only one scope per resource?
So for each resource, we need a scope. But we don't require 2 scopes for getting one resource. What do you think about such an approach? |
@maxceem I didn't find difference between my suggested scopes and your one... in other words, I think what you have written down is the same what I have in my mind.
|
This has been implemented for 3 sets of endpoints via #555 and available at DEV environment. Projects:
scopes: Projects Members:
scopes: Projects Members Invites:
scopes: |
@vikasrohit I've got a request from the James Cori to support standard M2M scopes:
all:project
read:project
write:project
Should we also keep the currently supported
all:connect_project
or can remove it?Please, let me know if this task is good to proceed with or there are any decisions to make.
The text was updated successfully, but these errors were encountered: