-
Notifications
You must be signed in to change notification settings - Fork 6
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
added POST, PUT, DELETE routes to modify Service objects through API #99
base: develop
Are you sure you want to change the base?
added POST, PUT, DELETE routes to modify Service objects through API #99
Conversation
How has the following been resolved?: should we add additional auth scopes to differentiate between read and write of objects? |
LGTM. My only requirement is that we treat these operations as optional somehow, since there will definitely be read-only registries (maybe most of them?). Let's make that explicit in the descriptions and couple these modifications with a section in the README explaining that? Or is there a better OAS way to mark this? With optionality, I'd be supportive of PATCH too. What would the auth scopes get us? We should also bump the spec version, I think this is the first PR since the last release. |
A couple of clarifying questions after the discussion on the call today: As for scopes, would specifying them in any way restrict us? For example, would having a scope for the list endpoint prevent us from having it accessible publicly to anonymous users? Would prescribing scopes in any way interfere with AAI and Passports? If the answer to these questions is no, I'm +1 for adding scopes. As for PATCH, I'm not sure where we landed. What I've heard from Jordi is that ELIXIR essentially don't have use case for PATCH, unless we make it more prescriptive, and would use PUT. I guess we have 2 options here:
I think this order corresponds to my preference. WDYT? |
Auth This is the behaviour that the GA4GH registry is aiming for with Patch Agree the writable endpoints should all be optional. Should we include some mechanism to inform the client what write operations are supported, if any? this could be done via
Do we also want to delineate scenarios in which a write operation may be blocked? (e.g. what Jordi mentioned about unexpected service types or versions, data race, etc). Do these apply to just |
As for auth, we definitely can't mandate that the /services endpoint is public in all cases. There are use cases, e.g. FASP, where you'd use the registry for internal service discovery in a completely secured platform. On our side we would get by without PATCH as well. As for writable endpoints, I don't think we need to disclose them under service-info. I see service info as general, likely public, service metadata, whereas what operations are allowed could depend on context (e.g. only allowed for specific users pending auth). In terms of blocking/validation, that seems like an implementation-specific detail. How would that affect the spec? Another response code? If it's just a response code and you have one in mind, I'm supportive of adding it. |
Agreed about private endpoints and not broadcasting write endpoints via |
Sounds like a good plan to me, thanks! I also prefer converging on a small number of generic errors, so I think 400 is fine. |
Pushed another commit based on discussions here and Aug 5th Discovery Networks meeting. There weren't many changes to make, as we decided to:
The only modification was an additional write endpoints section in the |
At the Discovery Networks meeting (Nov. 25, 2020), we decided to only merge this PR once the feature is implemented in the Service Registry Reference Implementation. For reference, this feature is already implemented in the GA4GH Registry |
PR for #65
POST
operation to/services
PUT
andDELETE
operations to/services/{serviceId}
requestBody
is submitted toPOST
orPUT
operations to create or update a service, respectivelySome questions for the group:
PATCH
operation for simple modification of a few properties?read
andwrite
of objects?@mcupak @jrambla