-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Define REST API Spec for Consistent Usage of Project Key #879
Comments
Related to #813 |
I'm interested in this issue. Can I work on it? |
@Wu22e As always, feel free to discuss with us while designing the specification. |
It's a good idea! It seems that we should list up all APIs that can be called with project key. Maybe, we have to discuss about it with this issue(#813). |
Secret key validation can be performed for all AdminService APIs except Current SituationIn the authenticate function of yorkie/server/rpc/interceptors/admin.go, the authorization value in the header is used to distinguish between a token and a secret key (priority: token first, then secret key). If a user token is used in the authorization header for GetProjects, project-level identification is not possible. Proposed Solution:
Other methods may also exist, so it would be great to discuss further! |
@Wu22e @devleejb @hackerwins Seems like we have lost our conversation afterward. Any thoughts? |
Sorry for the delayed response. I think it's a good approach to separate the field in the authorization header. @hackerwins @krapie |
What would you like to be added:
Currently, when sending a request to
/yorkie.v1.AdminService/GetDocument
, even if the project key is included in the header, the project's name still needs to be included in the request body. This inconsistency makes it challenging for users to interact with the API. To address this issue, it is necessary to define a clear REST API specification that ensures consistent usage of the project key in requests.Why is this needed:
Having a defined REST API spec will make it easier for users to interact with the API and ensure a more intuitive usage of the project key in requests.
The text was updated successfully, but these errors were encountered: