Skip to content

Commit 4b1336e

Browse files
authored
Merge pull request #184 from geopython/security-admin-api
add sections on security and admin
2 parents 6bb6c7d + 100654c commit 4b1336e

File tree

5 files changed

+54
-6
lines changed

5 files changed

+54
-6
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Administration
3+
---
4+
5+
# Administration
6+
7+
## Overview
8+
9+
pygeoapi provides an administration API (see the pygeoapi [documentation](https://docs.pygeoapi.io/en/latest/admin-api.html) for more information on how to enable, configure and use) in support of managing its configuration. The API (not an OGC API) is implementated as a RESTful service to help create, update, replace or delete various elements of pygeoapi configuration. A simple read-only UI is implemented as part of the admin API.
10+
11+
## User interface
12+
13+
By design, pygeoapi does not provide a true user interface to administer the configuration. Given that the admin API exists, a few options can be considered for developing an admin UI:
14+
15+
- standalone
16+
- simple application with no connectivity to the pygeoapi admin API
17+
- built off the pygeoapi configuration [schema](https://github.com/geopython/pygeoapi/blob/master/pygeoapi/schemas/config/pygeoapi-config-0.x.yml)
18+
- allows for paste of existing pygeoapi configuration
19+
- allows for generating pygeoapi configuration for copy/paste into a pygeoapi deployment
20+
- can be deployed anywhere (for example, GitHub Pages)
21+
- integrated
22+
- connected application to a pygeoapi deployment
23+
- built off the pygeoapi configuration [schema](https://github.com/geopython/pygeoapi/blob/master/pygeoapi/schemas/config/pygeoapi-config-0.x.yml)
24+
- reads/writes a live pygeoapi configuration via the pygeoapi admin API (access controlled)
25+
- deployed as part of a Docker Compose application
26+
27+
!!! note
28+
29+
Have your own idea for a pygeoapi admin UI? Connect with the [pygeoapi community](https://pygeoapi.io/community) to discuss your idea!

workshop/content/docs/advanced/inspire.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ recommendation and the relevant Good Practices.
3535
| Discovery service | CSW | OGC API - Records | [In preparation](https://github.com/INSPIRE-MIF/gp-ogc-api-records) |
3636
| View service | WM(T)S | OGC API - Maps / OGC API - Tiles | Not scheduled<br> [In preparation](https://wikis.ec.europa.eu/display/InspireMIG/69th+MIG-T+meeting+2022-04-01) |
3737
| Download service - Vector | WFS | OGC API - Features | [Adopted](https://github.com/INSPIRE-MIF/gp-ogc-api-features) |
38-
| Download service - Coverage | WCS | OGC API - Coverages / STAC | Not scheduled<br> [In preparation](https://github.com/INSPIRE-MIF/gp-stac) |
39-
| Download service - Sensor | SOS | OGC API - EDR / Sensorthings API [^1] | Not scheduled<br> [Adopted](https://github.com/INSPIRE-MIF/gp-ogc-sensorthings-api) |
38+
| Download service - Coverage | WCS | OGC API - Coverages / STAC [^1] | Not scheduled<br> [In preparation](https://github.com/INSPIRE-MIF/gp-stac) |
39+
| Download service - Sensor | SOS | OGC API - EDR / Sensorthings API [^2] | Not scheduled<br> [Adopted](https://github.com/INSPIRE-MIF/gp-ogc-sensorthings-api) |
4040

4141
[^1]: Sensorthings API and is not an OGC API standards and is currently not supported by pygeoapi. It is listed here for completeness
4242
[^2]: STAC is not OGC API standard but is supported by pygeoapi

workshop/content/docs/advanced/security-access-control.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@ title: Security and access control
44

55
# Security and access control
66

7+
## Overview
8+
79
Security in general is a broad and complex topic, affecting the entire development lifecycle.
810
It is recommended to follow security best practices during all development phases like design, coding and deployment.
911
In this workshop we will focus only on API security and access control, rather than the full range of application security topics.
1012

13+
## API security
14+
15+
API security is the whole process to protect APIs from attacks. It is part of the more general security guidelines that are being treated in the OWASP Top Ten document. So those recommendations still apply.
16+
1117
!!! Note "Application Security"
1218

1319
The Open Web Application Security Project (OWASP) [Top Ten document](https://owasp.org/www-project-top-ten/) is a very good tool to ensure the bare minimum against the security risks and manage critical treats that are most likely affecting your code.
1420

15-
API Security is the whole process to protect APIs from attacks. It is part of the more general security guidelines that are being treated in the OWASP Top Ten document. So those recommendations still apply.
21+
## Access control
1622

1723
Access control is another fundamental part of the Open Web Application Security Project and addresses the Identity and Access Management (IAM) of an API.
1824
IAM consists of two different parts of a security flow:
@@ -25,5 +31,17 @@ These parts are usually managed by dedicated infrastructures and solutions which
2531
!!! Note "OpenAPI Security Specification"
2632

2733
The OpenAPI specification has very well-defined elements for developers and adopters. The most relevant are:
28-
- [Security Scheme Object](https://swagger.io/specification/#security-scheme-object) defines the security schemes that can be used by the operations. Supported schemes are *HTTP Authentication*, an *API Key*, *OAuth2*'s flows and *OpenID Connect*.
29-
- [Security Requirement Object](https://swagger.io/specification/#security-requirement-object) defines the list of required security schemes to execute an operation.
34+
35+
- [Security Scheme Object](https://swagger.io/specification/#security-scheme-object) defines the security schemes that can be used by the operations. Supported schemes are *HTTP Authentication*, an *API Key*, *OAuth2*'s flows and *OpenID Connect*.
36+
- [Security Requirement Object](https://swagger.io/specification/#security-requirement-object) defines the list of required security schemes to execute an operation.
37+
38+
## pygeoapi considerations
39+
40+
pygeoapi does not yet support OpenAPI security elements. Future implementation could include generation of pygeoapi's OpenAPI document with a security configuration, or to generate from a known access control solution/application (such as [fastgeoapi](https://github.com/geobeyond/fastgeoapi) or [pygeoapi-auth](https://github.com/cartologic/pygeoapi-auth)).
41+
42+
Direct access control implementation is not in scope for pygeoapi. The desired approach here would be to leverage an existing solution and define/integrate the secured endpoints accordingly. For example, fastgeoapi or pygeoapi-auth could be deployed downstream of pygeoapi, and govern access to specific endpoints (collections, items, etc.).
43+
44+
45+
!!! Note
46+
47+
The [pygeoapi official documentation](https://docs.pygeoapi.io/en/latest/security.html) provides the project's official status on security implementation updates, and should be visited to keep up to date with the latest status on security implementation in the project.

workshop/content/docs/advanced/semantic-web-linked-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This section touches on 3 aspects of the Semantic Web:
88

99
- [Search engines](#search-engines)
1010
- [Publish spatial data in the semantic web](#publish-spatial-data-in-the-semantic-web)
11-
- [Proxy to semantic web](#proxy-to-semantic-web)
11+
- [Proxy to semantic web](#proxy-to-the-semantic-web)
1212

1313
## Search engines
1414

workshop/content/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ nav:
3030
- Semantic Web and Linked Data: advanced/semantic-web-linked-data.md
3131
- Cloud deployment: advanced/cloud.md
3232
- INSPIRE support: advanced/inspire.md
33+
- Administration: advanced/administration.md
3334
- Exercise 9 - pygeoapi as a bridge to other services: advanced/bridges.md
3435
- Conclusion: conclusion.md
3536

0 commit comments

Comments
 (0)