Skip to content

Commit c646c8d

Browse files
committed
add section on security (#43)
1 parent 9d7c2a8 commit c646c8d

File tree

3 files changed

+81
-2
lines changed

3 files changed

+81
-2
lines changed

workshop/content/docs/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ These Standards are being constructed as "building blocks" that can be used to a
1919
<tr>
2020
<td><a href="https://noc.social/@doublebyte"><img width="150" src="assets/images/joana-profile.jpeg"/></a></td>
2121
<td><a href="https://twitter.com/tomkralidis"><img width="150" src="https://avatars.githubusercontent.com/u/910430?v=4"/></a></td>
22-
<td><a href="https://twitter.com/krishnaglodha"><img width="150" src="https://avatars.githubusercontent.com/u/47075664?v=4"/></a></td>
2322
</tr>
2423
<tr>
2524
<td><a href="https://github.com/doublebyte1">Joana Simoes (OGC)</a></td>
2625
<td><a href="https://github.com/tomkralidis">Tom Kralidis (OSGeo)</a></td>
27-
<td><a href="https://github.com/krishnaglodha">Krishna Lodha (Rotten Grapes)</a></td>
2826
</tr>
2927
</table>
3028

workshop/content/docs/security.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Security and OGC APIs
3+
---
4+
5+
# Security and OGC APIs
6+
7+
OGC APIs are designed using modern technologies in order to lower the barrier to geospatial data, services, and processes.
8+
9+
## SSL/TLS
10+
11+
OGC APIs can be deployed using HTTP or HTTPS. It is strongly recommended to deploy any services using HTTPS so that clients
12+
can validate and verify authenticity of your services accordingly. Depending on how your system is architected, this may mean
13+
applying Secure Sockets Layer/Transport Layer Security (SSL/TLS) on your service host, or if you have a multi-layered deployment
14+
architecture, applying as part of your front-end services, at which point internal/inner communication may or may not be implemented
15+
using HTTP.
16+
17+
## Access control
18+
19+
Open Standards and APIs are not only for Open Data. Implementing access control (authentication, authorization) is a critical component
20+
of many infrastructures and systems in order to maintain data integrity, authority and trust. Examples of requiring access control in
21+
OGC APIs includes (but is not limited to):
22+
23+
- securing all endpoints
24+
- securing only specific endpoints
25+
- allowing insert/update/delete capabilities on items in a collection
26+
- allowing insert/update/delete capabilities on collections
27+
28+
Given that access control concerns, implementations and architectures exist for many domains, it is best to leverage industry standards
29+
for implementation. Given OGC API standards leverage the OpenAPI specification for service descriptions, one can use the OpenAPI
30+
[Security Scheme Object](https://spec.openapis.org/oas/v3.0.3#security-scheme-object) to describe (not implement!) the access control mechanism(s) for the
31+
entire API as well as for a specific path/operation of the API.
32+
33+
Supported OpenAPI security schemes include:
34+
35+
- API key (`apiKey`)
36+
- HTTP authentication (`http`)
37+
- OAuth2 common flows (`oauth2`)
38+
- OpenID Connect Discovery (`openIdConnect`)
39+
40+
41+
Access control using HTTP Basic authentication:
42+
```json
43+
"security": {
44+
"default": {
45+
"type": "http",
46+
"scheme": "basic",
47+
"description": "Please contact us for access information"
48+
}
49+
}
50+
```
51+
52+
Access control using an API key:
53+
```json
54+
"security": {
55+
"default": {
56+
"type": "apiKey",
57+
"name": "api-key",
58+
"in": "query",
59+
"description": "Please see https://example.org/contact-us for more information"
60+
}
61+
}
62+
```
63+
64+
Access control using OAuth2:
65+
```json
66+
"security": {
67+
"default": {
68+
"type": "oauth2",
69+
"authorizationUrl": "https://example.org/oauth/authorize",
70+
"flow": "implicit",
71+
"description": "Please see https://example.org/contact-us for more information"
72+
"scopes": {
73+
"read:roads": "read roads collection",
74+
"write:roads": "modify roads in the roads collection"
75+
}
76+
}
77+
```
78+
79+
!!! note
80+
Implementing the above assumes that the required access control mechanisms are in place.

workshop/content/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ nav:
2222
- OGC API - Environmental Data Retrieval: api-deep-dive/environmental-data-retrieval.md
2323
- OGC SensorThings API: api-deep-dive/sensorthings.md
2424
- OGC API roadmap: roadmap.md
25+
- Security: security.md
2526
- Transition and migration: transition-and-migration.md
2627
- Getting involved: getting-involved.md
2728
- Conclusion: conclusion.md

0 commit comments

Comments
 (0)