-
Notifications
You must be signed in to change notification settings - Fork 9
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
Unauthorized GET users/{username}/testcases/{testcase_name} #35
Comments
Previously, invalid endpoints would return a 404 in all cases. Now, if there is an invalid Authorization header then 401 will be returned for all generic endpoints under /users and /testcases. ref #35
@haraldwalnum and @dhblum. I addressed part of this issue in 4dc1bd6. Now when you send an invalid Authorization header for any of the endpoints under Now here is the rub. The AI (my brain) must have been hallicinating when the documentation was written, because it says that the endpoints My question is what should we do about it?
One wrinkle which I believe has already been brought up, is what happens if a default (IBPSA) test case name matches a namespace name? In such a scenario two endpoints would be ambiguous. Does test case named "apartment" exist in the default namespace? What test cases exist under the "apartment" namespace? Of course we could (and probbaly should) prevent this possibility with a rule in the test case upload API. Regardless, it does make me wonder if this indicates a flaw in the API and I'm interested in your thoughts. We could disambiguate the two overlapping APIs with a trailing Does test case named "apartment" exist in the default namespace? What test cases exist under the "apartment" namespace? What do you all think? |
related. #34 |
Another option might be to use the HTTP verb |
Given that we have the endpoint that returns a list of endpoints under a namespace, I don't really see a great need for this endpoint. |
Is it a better API design to do the following? Does test case named "apartment" exist in the default namespace? What test cases exist under the "apartment" namespace? |
I also agree with Harald, in that is: Does test case named "apartment" exist in the default namespace? needed if |
Remove documentation for APIs related to confirming the existence of test cases. These endpoints were never implemented. Users can get the list of test cases to confirm if a particular test case exists. ref #35
Thank guys. Based on your comments, I updated the documentation to remove those non-existant APIs and left it at that. I believe this issue is now resolved. We do still have the possibility that a test case name can overlap with a namespace, but I don't think there is actually a problem with that. If we choose, we could prevent overlapping test case and namespace names on upload, but for now my suggestion is that we leave things as they are. |
All sounds good, thanks Kyle. |
"When I try GET users/{username}/testcases/{testcase_name} without providing any authorization I get a 404 response. But I think it should be a 401, which is what I get if I do GET users/{username}/testcases/. Basically, if I don't have permission to view all test cases with a username, I shouldn't have permission to check if a single test case is present either. "
This scenario should return a 401.
The text was updated successfully, but these errors were encountered: