Skip to content

Commit 5bdb6b3

Browse files
committed
Cleanup
1 parent b1a0c73 commit 5bdb6b3

File tree

1 file changed

+25
-34
lines changed

1 file changed

+25
-34
lines changed

README.md

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# STAC Auth Proxy
1+
<div align="center">
2+
<h1 style="font-family: monospace">stac auth proxy</h1>
3+
<p align="center">Reverse proxy to apply auth*n scenarios to STAC APIs.</p>
4+
</div>
5+
6+
---
27

38
> [!WARNING]
49
> This project is currently in active development and may change drastically in the near future while we work towards solidifying a first release.
@@ -11,69 +16,64 @@ STAC Auth Proxy is a proxy API that mediates between the client and an internall
1116
- 🎟️ Content Filtering: Apply CQL2 filters to client requests, filtering API content based on user context
1217
- 📖 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
1318

14-
## Installation
19+
## Usage
1520

1621
> [!NOTE]
1722
> 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)).
1823
19-
This project uses [`uv`](https://docs.astral.sh/uv/) to manage project dependencies and environment.
24+
### Installation
25+
26+
For local development, his project uses [`uv`](https://docs.astral.sh/uv/) to manage project dependencies and environment.
2027

2128
```sh
2229
uv sync
2330
```
2431

25-
## Running
32+
Otherwise, the application can be installed as a standard Python module:
2633

2734
```sh
28-
uv run python -m stac_auth_proxy
35+
python3 install src
2936
```
3037

31-
## Configuration
38+
### Running
3239

33-
The application is configurable via environment variables.
40+
The simplest way to run the project is by calling the module directly:
3441

35-
### Core Settings
42+
```sh
43+
python -m stac_auth_proxy
44+
```
3645

37-
- `DEBUG`
46+
Alternatively, the application's factory can be passed to Uvicorn:
3847

39-
- Enables debug mode and `/_debug` endpoint
40-
- **Type:** boolean
41-
- **Default:** `false`
42-
- **Example:** `true`
48+
```sh
49+
uvicorn --factory stac_auth_proxy:create_app
50+
```
4351

44-
- `UPSTREAM_URL`
52+
### Configuration
53+
54+
The application is configurable via environment variables.
4555

56+
- `UPSTREAM_URL`
4657
- The STAC API to proxy requests to
4758
- **Type:** HTTP(S) URL
4859
- **Required:** Yes
4960
- **Example:** `https://your-stac-api.com/stac`
50-
5161
- `OIDC_DISCOVERY_URL`
52-
5362
- OpenID Connect discovery document URL
5463
- **Type:** HTTP(S) URL
5564
- **Required:** Yes
5665
- **Example:** `https://auth.example.com/.well-known/openid-configuration`
57-
5866
- `OIDC_DISCOVERY_INTERNAL_URL`
5967
- The internal network OpenID Connect discovery document URL
6068
- **Type:** HTTP(S) URL
6169
- **Required:** No, defaults to value of `OIDC_DISCOVERY_URL`
6270
- **Example:** `http://auth/.well-known/openid-configuration`
63-
64-
### Access Control
65-
66-
Routes can be configured as requiring a valid authentication token by by specifying a blanket `default_public` rule and then explicit overrides (`private_endpoints` or `public_endpoints`).
67-
6871
- `DEFAULT_PUBLIC`
69-
7072
- **Description:** Default access policy for endpoints
7173
- **Type:** boolean
7274
- **Default:** `false`
7375
- **Example:** `false`, `1`, `True`
74-
7576
- `PRIVATE_ENDPOINTS`
76-
7777
- **Description:** Endpoints explicitely marked as requiring authentication, for use when `DEFAULT_PUBLIC == True`
7878
- **Type:** JSON object mapping regex patterns to HTTP methods OR to tuples of HTTP methods and an array of strings representing required scopes.
7979
- **Default:**
@@ -86,7 +86,6 @@ Routes can be configured as requiring a valid authentication token by by specify
8686
"^/collections/([^/]+)/bulk_items$": ["POST"]
8787
}
8888
```
89-
9089
- `PUBLIC_ENDPOINTS`
9190
- **Description:** Endpoints explicitely marked as not requiring authentication, for use when `DEFAULT_PUBLIC == False`
9291
- **Type:** JSON object mapping regex patterns to HTTP methods
@@ -97,19 +96,12 @@ Routes can be configured as requiring a valid authentication token by by specify
9796
"^/api$": ["GET"]
9897
}
9998
```
100-
101-
### API Documentation
102-
10399
- `OPENAPI_SPEC_ENDPOINT`
104100
- Path to serve OpenAPI specification
105101
- **Type:** string or null
106102
- **Default:** `null` (disabled)
107103
- **Example:** `/api`
108-
109-
### Filtering
110-
111104
- `ITEMS_FILTER`
112-
113105
- Configuration for item-level filtering
114106
- **Type:** JSON object with class configuration
115107
- **Default:** `null`
@@ -127,7 +119,6 @@ Routes can be configured as requiring a valid authentication token by by specify
127119
}
128120
}
129121
```
130-
131122
- `ITEMS_FILTER_ENDPOINTS`
132123
- Where to apply item filtering
133124
- **Type:** JSON object mapping regex patterns to HTTP methods

0 commit comments

Comments
 (0)