-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f83787f
commit 1fa47d7
Showing
3 changed files
with
47 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Getting started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,43 @@ | ||
# Tutorials | ||
|
||
## Configure Authentication | ||
## Authentication and Authorization | ||
|
||
!!! tip "Familiarize with the topic" | ||
If you don't have prior experience with the topic, we recommend reading [Authentication and Authorization in Applications](https://www.permit.io/blog/authentication-vs-authorization), which is a really good introduction on the difference between Authentication and Authorization that helps you understand how they focus on two different purposes. | ||
|
||
This tutorial aims to guide the user to configure **fastgeoapi** with a mechanism that fits with your security requirements. | ||
The tool supports different security schemes for [OGC APIs](https://ogcapi.ogc.org/) served by [pygeoapi](https://pygeoapi.io) and allows optionally to enable a coarse or fine-grade authorization for a *collection* and the endpoints based on user needs and use cases. | ||
|
||
Supported security schemes are: | ||
|
||
- **API KEY**: mostly used for machine to machine communication where a static shared secret can be kept secured or for internal interactions among microservices; | ||
- **OAuth2**: commonly used for authorization to accessing resources between two systems and also for stronger machine to machine communication with external parties when a secret needs to be rotated; | ||
- **OpenID Connect**: It looks like very similar to OAuth2 and in fact it is built on top of that. It allows to identify and authenticate a user in mobile and Single-Page Application (SPA). | ||
|
||
!!! note "OAuth2 vs OpenID Connect" | ||
It is beneficial to clarify that they serve two different purposes. [OAuth2](https://en.wikipedia.org/wiki/OAuth) is a framework for *Authorization* while [OpenID Connect](https://openid.net/developers/how-connect-works/) is a protocol for *Authentication*. If you would like to develop further the concepts then [this]() is an appropriate read. | ||
|
||
## Configure and protect pygeoapi | ||
|
||
The protection mechanisms introduced above are mutually exclusive and they apply to the whole `pygeoapi` application that is wrapped by *fastgeoapi*. | ||
The configuration happens in the `.env` file where the environment variables for development and production are defined. As explained in the [getting-started](getting-started.md) section their prefix identifies the target environment (i.e. `DEV_` vs `PROD_`). Let's go through the different mechanisms. | ||
|
||
Please make sure to have cloned the [repo](https://github.com/geobeyond/fastgeoapi) before starting the following section. | ||
|
||
### API KEY | ||
|
||
TBD | ||
|
||
### OAuth2 | ||
TBD | ||
|
||
## Configure Authorisation | ||
TBD | ||
|
||
### OpenID Connect | ||
|
||
TBD | ||
|
||
## Configure a coarse or fine-grained authorization | ||
|
||
### Policies as code | ||
|
||
TBD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters