Dataselect normally uses 2 HTTP status codes -- 200 (data available) and 204/404 (no data available). Unauthorized data is simply filtered out, which can be confusing -- a user getting 204/404 does not know if data is not available at all or he is not authorized to get restricted data. In the latter case he should contact the data center.
This pull request replaces 204/404 by 403 (forbidden) if access to all requested data was denied. If the request includes non-restricted channels, still 204/404 is used for compatibility reasons. We decided to not add an additional non-standard query parameter like "noaccess=403", which would make client logic more complex (some servers give bad request error if unsupported query parameters are used).
Note that 403 is listed as "Authentication failed or access blocked to restricted data" in table 1 of FDSN Web Service Specifications (Common HTTP status codes returned by FDSN services).
In addition:
Unauthorized time windows are logged with tracker as DENIED.
The 404 page shows "no metadata found" if the request does not include any existing channels.
Dataselect normally uses 2 HTTP status codes -- 200 (data available) and 204/404 (no data available). Unauthorized data is simply filtered out, which can be confusing -- a user getting 204/404 does not know if data is not available at all or he is not authorized to get restricted data. In the latter case he should contact the data center.
This pull request replaces 204/404 by 403 (forbidden) if access to all requested data was denied. If the request includes non-restricted channels, still 204/404 is used for compatibility reasons. We decided to not add an additional non-standard query parameter like "noaccess=403", which would make client logic more complex (some servers give bad request error if unsupported query parameters are used).
Note that 403 is listed as "Authentication failed or access blocked to restricted data" in table 1 of FDSN Web Service Specifications (Common HTTP status codes returned by FDSN services).
In addition: