-
Notifications
You must be signed in to change notification settings - Fork 56
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
Decision Proposal 010 - Standard HTTP Headers #10
Comments
Thanks for the tip -JB- |
Versioning Headers For example: Accept: application/vnd.data61.v2+json;q=0.1, application/vnd..v5+json;q=0.9. Here the data consumer is requesting v2 of the Data61 APIs, prefering v5 of the vendor specific API from vendor . By negotiating versions with this mechanism, the response in the case where the server cannot find a good match would be 406 Not Acceptable. This approach would eliminate the need for the custom headers - x-v, x-min-v, x-v, and x--v - instead relying on built in features of the HTTP specs to support this negotiation and returning standard errors if negotiation failed. Throttling Headers
@JamesMBligh - it would be great if you could clarify your interpretation of how throttling will work. We will leave our views off this item as its tangential to the question of what standard headers are included. However maybe another Decision Proposal for throttling would be appropriate? |
I understand the point on the version header but having separate custom headers for versioning will be a lot easier for provider and client implementations as well as readability of the requests during troubleshooting and testing. Custom headers are also valid parts of the HTTP spec so we’re not really stepping outside of standards. With regards to throttling, I picked up the headers and errors from the U.K. spec verbatim as they seemed reasonable and not constraining in any way. I will add a decision to the list for NFRs in general as the topic does recur in questions. Thanks for the feedback. -JB- |
@JamesMBligh - your points on custom headers are good. As a guiding principal, we would prefer the design to use established features of the HTTP standard, to re-inventing new ones. Inventing new ones is good if the existing standards fall materially short. Versioning Headers For example, On success, the server for data provider bar might respond with
If the client wanted to specify a min version too, to avoid the 406, this is supported: Another advantage of the Accepts approach is that all supported headers are known now at design time. This allows us to set the CORS Access-Control-Allow-Headers value to Accepts, and then clients can send a standard Accepts header to all data providers. If custom data provider headers are being added all the time, then data providers will either have to accept all headers which would be a security concern, or the client would have to customise the request for each data provider. Compression Headers Caching Headers |
The Queensland FP Lab (Data61) agree with @da-banking. We believe that standard HTTP headers should be used when possible and that the |
I agree with @JamesMBligh. I understand that using the Accept header to negotiate versions is closer to the standard, but I'm also a strong advocate of easy to understand APIs. So even though it is not a standard header, I think using x-v and x-min-v contributes to the overall "readability" of the API specification and, as it's been pointed out before, makes it easier to test and troubleshoot. |
I am of the opinion that using an Parsing is relatively trivial. See, for example, the Data61 parser exercise, which is done on day 2 of an introductory programming course and the benefits of compliance and subsequent tools are too great to forgo in light of this. This model of parsing, which goes back many decades, has even been implemented (and is still supported) in Java: |
My thoughts on the feedback so far are as follows: Additional Headers Accept Header CORS A final observation regarding CORS is that it is mainly relevant for direct API calls from the client. Some of the arguments presented are relevant for calls to the APIs directly from the browser or mobile client but less relevant for the more common use case of server to server calls supporting a long running authorisation. It is not yet clear if an implicit model will even be supported during the first phase. That said, the decision could go either way and could change in the future so it is not a point that would be definitive. -JB- |
Feedback will close on this item tonight and the decision will likely align with my previous comment pending additional feedback this afternoon. -JB- |
With respect to Accept Headers we agree with the statement below, i.e. we should in general not overload the meaning of data. This can only lead to confusion; and opens the door for more overloading in future.
For more advanced contract negotiation use cases the ability to extend and correlate request and response headers will be invaluable. Can we assume that:
We recommend including:
Some useful reading on the topic: |
The consensus of the ABA Online Banking Technical Working Group is that we collectively support Data61's recommended base set of headers. Additional comments from WG members regarding expanding/clarifying the recommended set have been posted previously in this thread. |
COBA supports the adoption of a standard HTTP header format, as this would be more consistent with the API Principles (particularly Principle 2: APIs use open standards). COBA notes that there are a number of common web application attacks that focus on header information (such as cross-site scripting) and, in this context, suggest that this decision proposal also be considered by Data61’s Information Security Working Group. |
I have now closed consultation on this decision. A recommendation incorporating feedback will be made to the Chair in due course. -JB- |
The finalised decision for this topic has been endorsed. Please refer to the attached document. -JB- |
This decision proposal outlines a recommendation on the standard HTTP headers to be used for the API standards. Note that security headers have been specifically left out awaiting the working of the Security Working Group.
Feedback is now open for this proposal. Feedback is planned to be closed on the 14th September.
Decision Proposal 010 - Standard HTTP Headers.pdf
The text was updated successfully, but these errors were encountered: