-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Implement OGC API Features Part 4 transactions for Senosorthings provider #1911
Conversation
Thanks @webb-ben for this nice feature. I'd like to raise a discussion about the first point, in particular the validation and delegation part since I do believe it applies to other providers.
Hope these points are valuable for a broader discussion with the whole pygeoapi community |
Thanks for the comment @francbartoli.
I agree that any time we interact with a provided payload, there is an inherent risk. That being said, it is important to recognize that the docs try to make it clear for both OAFeat Part 4: Transactions and the Admin API that access control is not provided by pygeoapi—we explicitly state not to enable either componentswithout another service to provide authentication/authorization in line with the specification's security considerations. Is your comment expressing a desire for such software to be readily deployable with pygeoapi, or something different? It might be worth moving such a conversation to its own issue.
SensorThings is nearly impossible to validate entirely within pygeoapi because of how broad the specification is. I have used pygeoapi as OGC API - Features server for the default STA entity model, STAPlus, and WQIE STA. If we decide to validate against the default STA entity model, we would still face the issue that SensorThings servers might still reject a payload due to the absence of a related dependent entity - something we can only discover by contacting the STA endpoint. Another wrinkle is that, depending on the configuration of a FROST-Server, a payload with a client-assigned |
Thanks for the comments. I think the shortest path would be to introduce a validator plugin concept, which would have base methods such as Then, in pygeoapi configuration, one would define, in their provider definition: providers:
- type: record
editable: true
validator: path.to.module.MyValidator
... The idea would be that I have been working on this concept and will issue an RFC/PR in the coming weeks for review and comment. In the meantime, in the context of how pygeoapi currently handles transactions, I think this PR has enough consistency with the rest of the codebase for merge. |
@tomkralidis would that be validation against geoJSON? As it is implemented this pull request is handling the creation of SensorThings JSON which isn't always valid geojson. That being said +1 to a generic validator and potentially injection inspector. |
A given validator could be against anything really and would be responsible for data validation etc., depending on the data type. |
Overview
Related Issue / discussion
Additional information
Dependency policy (RFC2)
Updates to public demo
Contributions and licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)