You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<palign="center">Reverse proxy to apply auth*n to STAC APIs.</p>
3
+
<palign="center">Reverse proxy to apply auth*n your STAC API.</p>
4
4
</div>
5
5
6
6
---
7
7
8
8
> [!WARNING]
9
9
> This project is currently in active development and may change drastically in the near future while we work towards solidifying a first release.
10
10
11
-
STAC Auth Proxy is a proxy API that mediates between the client and an internally accessible STAC API to provide a flexible authentication, authorization, and content-filtering mechanism.
11
+
STAC Auth Proxy is a proxy API that mediates between the client and your internally accessible STAC API to provide flexible authentication, authorization, and content-filtering mechanisms.
12
12
13
13
## Features
14
14
@@ -71,12 +71,12 @@ The application is configurable via environment variables.
71
71
-`DEFAULT_PUBLIC`
72
72
-**Description:** Default access policy for endpoints
73
73
-**Type:** boolean
74
-
-**Default:**`false`
74
+
-**Required:** No, defaults to`false`
75
75
-**Example:**`false`, `1`, `True`
76
76
-`PRIVATE_ENDPOINTS`
77
77
-**Description:** Endpoints explicitly marked as requiring authentication, for use when `DEFAULT_PUBLIC == True`
78
78
-**Type:** JSON object mapping regex patterns to HTTP methods OR tuples of HTTP methods and an array of strings representing required scopes
79
-
-**Default:**
79
+
-**Required:** No, defaults to the following:
80
80
```json
81
81
{
82
82
"^/collections$": ["POST"],
@@ -89,7 +89,7 @@ The application is configurable via environment variables.
89
89
- `PUBLIC_ENDPOINTS`
90
90
- **Description:** Endpoints explicitly marked as not requiring authentication, for use when `DEFAULT_PUBLIC == False`
91
91
- **Type:** JSON object mapping regex patterns to HTTP methods
92
-
- **Default:**
92
+
- **Required:** No, defaults to the following:
93
93
```json
94
94
{
95
95
"^/api.html$": ["GET"],
@@ -99,12 +99,12 @@ The application is configurable via environment variables.
99
99
- `OPENAPI_SPEC_ENDPOINT`
100
100
- Path to serve OpenAPI specification
101
101
- **Type:** string or null
102
-
- **Default:** `null` (disabled)
102
+
- **Required:** No, defaults to `null` (disabled)
103
103
- **Example:** `/api`
104
104
- `ITEMS_FILTER`
105
105
- Configuration for item-level filtering
106
106
- **Type:** JSON object with class configuration
107
-
- **Default:** `null`
107
+
- **Required:** No, defaults to `null` (disabled)
108
108
- Components:
109
109
- `cls`: Python import path
110
110
- `args`: List of positional arguments
@@ -122,7 +122,7 @@ The application is configurable via environment variables.
122
122
- `ITEMS_FILTER_ENDPOINTS`
123
123
- Where to apply item filtering
124
124
- **Type:** JSON object mapping regex patterns to HTTP methods
125
-
- **Default:**
125
+
- **Required:** No, defaults to the following:
126
126
```json
127
127
{
128
128
"^/search$": ["GET", "POST"],
@@ -132,13 +132,13 @@ The application is configurable via environment variables.
132
132
133
133
### Customization
134
134
135
-
While this project aims to provide utility out-of-the-box as a runnable application, it's likely won't address every project's needs. In these situations, this codebase can instead be treated as a library of components that can be used to augment any webserver that makes use of the [ASGI protocol](https://asgi.readthedocs.io/en/latest/) (e.g. [Django](https://docs.djangoproject.com/en/3.0/topics/async/), [Falcon](https://falconframework.org/), [FastAPI](https://github.com/tiangolo/fastapi), [Litestar](https://litestar.dev/), [Responder](https://responder.readthedocs.io/en/latest/), [Sanic](https://sanic.dev/), [Starlette](https://www.starlette.io/)). Review [`app.py`](https://github.com/developmentseed/stac-auth-proxy/blob/main/src/stac_auth_proxy/app.py) to get a sense of how we make use of the various components to construct a FastAPI application.
135
+
While the project is designed to work out-of-the-box as an application, it might not address every projects needs. When the need for customization arises, the codebase can instead be treated as a library of components that can be used to augment any [ASGI](https://asgi.readthedocs.io/en/latest/)-compliant webserver (e.g. [Django](https://docs.djangoproject.com/en/3.0/topics/async/), [Falcon](https://falconframework.org/), [FastAPI](https://github.com/tiangolo/fastapi), [Litestar](https://litestar.dev/), [Responder](https://responder.readthedocs.io/en/latest/), [Sanic](https://sanic.dev/), [Starlette](https://www.starlette.io/)). Review [`app.py`](https://github.com/developmentseed/stac-auth-proxy/blob/main/src/stac_auth_proxy/app.py) to get a sense of how we make use of the various components to construct a FastAPI application.
136
136
137
137
## Architecture
138
138
139
139
### Middleware Stack
140
140
141
-
Requests pass through a chain of middleware, each performing individual tasks:
141
+
The majority of the proxy's functionality occurs within a chain of middlewares. Each request passes through this chain, wherein each middleware performs a specific task:
0 commit comments