Skip to content

Commit 1be912c

Browse files
committed
chore(docs): cleanup
1 parent 1376fb3 commit 1be912c

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
<div align="center">
22
<h1 style="font-family: monospace">stac auth proxy</h1>
3-
<p align="center">Reverse proxy to apply auth*n scenarios to STAC APIs.</p>
3+
<p align="center">Reverse proxy to apply auth*n to STAC APIs.</p>
44
</div>
55

66
---
77

88
> [!WARNING]
99
> This project is currently in active development and may change drastically in the near future while we work towards solidifying a first release.
1010
11-
STAC Auth Proxy is a proxy API that mediates between the client and an internally accessible STAC API in order to provide a flexible authentication, authorization, and content filtering mechanism.
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.
1212

1313
## Features
1414

1515
- 🔐 Authentication: Selectively apply OIDC auth to some or all endpoints & methods
1616
- 🎟️ Content Filtering: Apply CQL2 filters to client requests, filtering API content based on user context
17-
- 📖 OpenAPI Augmentation: Update [OpenAPI](https://swagger.io/specification/) with security requirements, keeping auto-generated docs (e.g. [Swagger UI](https://swagger.io/tools/swagger-ui/)) accurate
17+
- 📖 OpenAPI Augmentation: Update [OpenAPI](https://swagger.io/specification/) with security requirements, keeping auto-generated docs/UIs accurate (e.g. [Swagger UI](https://swagger.io/tools/swagger-ui/))
1818

1919
## Usage
2020

2121
> [!NOTE]
22-
> Currently, the project is only installable by downlaoding 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/issues/5)) and PyPi ([#30](https://github.com/developmentseed/issues/30)).
2323
2424
### Installation
2525

26-
For local development, his project uses [`uv`](https://docs.astral.sh/uv/) to manage project dependencies and environment.
26+
For local development, we use [`uv`](https://docs.astral.sh/uv/) to manage project dependencies and environment.
2727

2828
```sh
2929
uv sync
@@ -32,7 +32,7 @@ uv sync
3232
Otherwise, the application can be installed as a standard Python module:
3333

3434
```sh
35-
python3 install src
35+
pip install -e .
3636
```
3737

3838
### Running
@@ -66,16 +66,16 @@ The application is configurable via environment variables.
6666
- `OIDC_DISCOVERY_INTERNAL_URL`
6767
- The internal network OpenID Connect discovery document URL
6868
- **Type:** HTTP(S) URL
69-
- **Required:** No, defaults to value of `OIDC_DISCOVERY_URL`
69+
- **Required:** No, defaults to the value of `OIDC_DISCOVERY_URL`
7070
- **Example:** `http://auth/.well-known/openid-configuration`
7171
- `DEFAULT_PUBLIC`
7272
- **Description:** Default access policy for endpoints
7373
- **Type:** boolean
7474
- **Default:** `false`
7575
- **Example:** `false`, `1`, `True`
7676
- `PRIVATE_ENDPOINTS`
77-
- **Description:** Endpoints explicitely marked as requiring authentication, for use when `DEFAULT_PUBLIC == True`
78-
- **Type:** JSON object mapping regex patterns to HTTP methods OR to tuples of HTTP methods and an array of strings representing required scopes.
77+
- **Description:** Endpoints explicitly marked as requiring authentication, for use when `DEFAULT_PUBLIC == True`
78+
- **Type:** JSON object mapping regex patterns to HTTP methods OR tuples of HTTP methods and an array of strings representing required scopes
7979
- **Default:**
8080
```json
8181
{
@@ -87,7 +87,7 @@ The application is configurable via environment variables.
8787
}
8888
```
8989
- `PUBLIC_ENDPOINTS`
90-
- **Description:** Endpoints explicitely marked as not requiring authentication, for use when `DEFAULT_PUBLIC == False`
90+
- **Description:** Endpoints explicitly marked as not requiring authentication, for use when `DEFAULT_PUBLIC == False`
9191
- **Type:** JSON object mapping regex patterns to HTTP methods
9292
- **Default:**
9393
```json
@@ -132,7 +132,7 @@ The application is configurable via environment variables.
132132

133133
### Customization
134134

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 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.
136136

137137
## Architecture
138138

@@ -145,23 +145,23 @@ The middleware stack is processed in reverse order (bottom to top):
145145
- Handles authentication and authorization
146146
- Configurable public/private endpoints
147147
- OIDC integration
148+
- Places auth token payload in request state
148149

149150
2. **BuildCql2FilterMiddleware**
150151

151-
- Builds CQL2 filters based on request context
152-
- Stores filter in request state
152+
- Builds CQL2 filters based on request context/state
153+
- Places [CQL2 expression](http://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) in request state
153154

154155
3. **ApplyCql2FilterMiddleware**
155156

156-
- Retrieves filter from request state
157-
- Applies the built CQL2 filter to requests
158-
- Modifies query strings for GET requests
159-
- Modifies JSON bodies for POST/PUT/PATCH requests
157+
- Retrieves [CQL2 expression](http://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) from request state
158+
- Augments request with CQL2 filter:
159+
- Modifies query strings for GET requests
160+
- Modifies JSON bodies for POST/PUT/PATCH requests
160161

161162
4. **OpenApiMiddleware**
162163

163-
- Modifies OpenAPI specification
164-
- Adds security requirements
164+
- Modifies OpenAPI specification based on endpoint configuration, adding security requirements
165165
- Only active if `openapi_spec_endpoint` is configured
166166

167167
5. **AddProcessTimeHeaderMiddleware**
@@ -170,7 +170,7 @@ The middleware stack is processed in reverse order (bottom to top):
170170

171171
### Data filtering via CQL2
172172

173-
In order to provide row-level content filtering, the system supports generating CQL2 filters based on request context. These CQL2 filters are then set on outgoing requests prior to the upstream API.
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.
174174

175175
> [!IMPORTANT]
176176
> The upstream STAC API must support the [STAC API Filter Extension](https://github.com/stac-api-extensions/filter/blob/main/README.md).

0 commit comments

Comments
 (0)