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
Copy file name to clipboardExpand all lines: README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ STAC Auth Proxy is a proxy API that mediates between the client and an internall
19
19
## Usage
20
20
21
21
> [!NOTE]
22
-
> Currently, the project can only be installed by downloading the repository. It will eventually be available on Docker ([#5](https://github.com/developmentseed/issues/5)) and PyPi ([#30](https://github.com/developmentseed/issues/30)).
22
+
> Currently, the project can only be installed by downloading the repository. It will eventually be available on Docker ([#5](https://github.com/developmentseed/stac-auth-proxy/issues/5)) and PyPi ([#30](https://github.com/developmentseed/stac-auth-proxy/issues/30)).
23
23
24
24
### Installation
25
25
@@ -125,7 +125,7 @@ The application is configurable via environment variables.
125
125
- **Default:**
126
126
```json
127
127
{
128
-
"^/search$": ["POST"],
128
+
"^/search$": ["GET", "POST"],
129
129
"^/collections/([^/]+)/items$": ["GET", "POST"]
130
130
}
131
131
```
@@ -138,7 +138,7 @@ While this project aims to provide utility out-of-the-box as a runnable applicat
138
138
139
139
### Middleware Stack
140
140
141
-
The middleware stack is processed in reverse order (bottom to top):
141
+
Requests pass through a chain of middleware, each performing individual tasks:
142
142
143
143
1. **EnforceAuthMiddleware**
144
144
@@ -156,8 +156,8 @@ The middleware stack is processed in reverse order (bottom to top):
156
156
157
157
- Retrieves [CQL2 expression](http://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) from request state
158
158
- Augments request with CQL2 filter:
159
-
- Modifies query strings for GET requests
160
-
- Modifies JSON bodies for POST/PUT/PATCH requests
159
+
- Modifies query strings for `GET` requests
160
+
- Modifies JSON bodies for `POST`/`PUT`/`PATCH` requests
161
161
162
162
4. **OpenApiMiddleware**
163
163
@@ -173,10 +173,10 @@ The middleware stack is processed in reverse order (bottom to top):
173
173
The system supports generating CQL2 filters based on request context to provide row-level content filtering. These CQL2 filters are then set on outgoing requests prior to the upstream API.
174
174
175
175
> [!IMPORTANT]
176
-
> The upstream STAC API must support the [STAC API Filter Extension](https://github.com/stac-api-extensions/filter/blob/main/README.md).
176
+
> The upstream STAC API must support the [STAC API Filter Extension](https://github.com/stac-api-extensions/filter/blob/main/README.md), including the [Features Filter](http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter) conformance class on to the Features resource (`/collections/{cid}/items`) [#37](https://github.com/developmentseed/stac-auth-proxy/issues/37).
177
177
178
178
> [!TIP]
179
-
> Integration with external authorization systems (e.g. [Open Policy Agent](https://www.openpolicyagent.org/)) can be achieved by replacing the default `BuildCql2FilterMiddleware` with a custom async middleware that is capable of generating [`cql2.Expr` objects](https://developmentseed.org/cql2-rs/latest/python/#cql2.Expr).
179
+
> Integration with external authorization systems (e.g. [Open Policy Agent](https://www.openpolicyagent.org/)) can be achieved by specifying an `ITEMS_FILTER` that points to a class/function that, once initialized, returns a [`cql2.Expr` object](https://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) when called with the request context.
| ❌ ([#22](https://github.com/developmentseed/issues/22)) |`PUT`|`/collections/{collection_id}}`| Update | Collection | Fetch Collection and validate CQL2 query; merge Item with body and validate with generated CQL2 query. |
202
-
| ❌ ([#22](https://github.com/developmentseed/issues/22)) |`DELETE`|`/collections/{collection_id}`| Delete | Collection | Fetch Collectiion and validate with CQL2 query. |
199
+
| ❌ ([#22](https://github.com/developmentseed/stac-auth-proxy/issues/22)) |`POST`|`/collections/`| Create | Collection | Validate body with generated CQL2 query. |
| ❌ ([#22](https://github.com/developmentseed/stac-auth-proxy/issues/22)) |`PUT`|`/collections/{collection_id}}`| Update | Collection | Fetch Collection and validate CQL2 query; merge Item with body and validate with generated CQL2 query. |
202
+
| ❌ ([#22](https://github.com/developmentseed/stac-auth-proxy/issues/22)) |`DELETE`|`/collections/{collection_id}`| Delete | Collection | Fetch Collectiion and validate with CQL2 query. |
| ❌ ([#21](https://github.com/developmentseed/issues/21)) |`POST`|`/collections/{collection_id}/items`| Create | Item | Validate body with generated CQL2 query. |
206
-
| ❌ ([#21](https://github.com/developmentseed/issues/21)) |`PUT`|`/collections/{collection_id}/items/{item_id}`| Update | Item | Fetch Item and validate CQL2 query; merge Item with body and validate with generated CQL2 query. |
207
-
| ❌ ([#21](https://github.com/developmentseed/issues/21)) |`DELETE`|`/collections/{collection_id}/items/{item_id}`| Delete | Item | Fetch Item and validate with CQL2 query. |
208
-
| ❌ ([#21](https://github.com/developmentseed/issues/21)) |`POST`|`/collections/{collection_id}/bulk_items`| Create | Item | Validate items in body with generated CQL2 query. |
| ❌ ([#21](https://github.com/developmentseed/stac-auth-proxy/issues/21)) |`POST`|`/collections/{collection_id}/items`| Create | Item | Validate body with generated CQL2 query. |
206
+
| ❌ ([#21](https://github.com/developmentseed/stac-auth-proxy/issues/21)) |`PUT`|`/collections/{collection_id}/items/{item_id}`| Update | Item | Fetch Item and validate CQL2 query; merge Item with body and validate with generated CQL2 query. |
207
+
| ❌ ([#21](https://github.com/developmentseed/stac-auth-proxy/issues/21)) |`DELETE`|`/collections/{collection_id}/items/{item_id}`| Delete | Item | Fetch Item and validate with CQL2 query. |
208
+
| ❌ ([#21](https://github.com/developmentseed/stac-auth-proxy/issues/21)) |`POST`|`/collections/{collection_id}/bulk_items`| Create | Item | Validate items in body with generated CQL2 query. |
0 commit comments