-
Notifications
You must be signed in to change notification settings - Fork 83
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
What needs to be done to extend OpenAPI security? #135
Comments
I would build on the concept described in the OWS Security standard (pending). The unsecured request would receive sufficient information to understand the security controls supported by the service. In a simple case, the OpenAPI document could report support for two Security Requirement Objects. One would indicate support for anonymous access, the other for your selected authentication method. According to the OpenAPI spec, "The Paths MAY be empty, due to ACL constraints." So under anonymous access you would not see any of the details of the Paths objects. |
Maybe the server could respond with the generic OpenAPI document at Of course, a user that is logged in could also get an OpenAPI definition at |
@cportele to keep things simple, the generic OAS document could only advertise the /api path, servers (optional), and security requirements. This is all you need to access a protected OAS document. It is also not tied to WFS so we can use it for any OGC service. |
It would be good to understand the typical expectations of developers that access protected/restricted APIs, before we settle on a recommendation. What information is helpful, what is confusing, what information is needed, etc. |
I'll see if we can put together a survey for our developers. What we can do now is identify the absolute minimum required to boot-strap access to a service. Developers can always add more. |
See Section 10 of the Users Guide. If that is sufficient, then we will close this issue. |
This is a general issues about security and OpenAPI. It was motivated by a problem that @aaime and I have related to generating a parameterized OpenAPI document in a secure environment (although I don't think the problem is isolated to this approach of generating the OpenAPI document).
There is a bit of a chicken and egg situation. The basic problem boils down to this. A client needs to access the /api document in an unsecure way in order to read the security information in the OpenAPI document in order to know how to authenticate to access a WFS. What does the OpenAPI document look like in this initial unsecured access? It cannot be a "normal" OpenAPI document with the normal /collections information since the list of collections (either listed explicitly or as a enum for the {collectionId} parameter) that would appear in the OpenAPI document depends on the user's authentication and authorization in the first place.
Since this seems to be a general problem about OpenAPI and security, I created this issue to track discussion on this topic and specifically looks at how OpenAPI might be extend to better handle the needs of WFS.
The text was updated successfully, but these errors were encountered: