Skip to content

Commit 6ba081e

Browse files
committed
docs(user-guide): create getting-started section
1 parent d962230 commit 6ba081e

File tree

4 files changed

+116
-59
lines changed

4 files changed

+116
-59
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ STAC Auth Proxy is a proxy API that mediates between the client and your interna
2626
- **📘 OpenAPI Augmentation:** Enhance the [OpenAPI spec](https://swagger.io/specification/) with security details to keep auto-generated docs and UIs (e.g., [Swagger UI](https://swagger.io/tools/swagger-ui/)) accurate
2727
- **🗜️ Response Compression:** Optimize response sizes using [`starlette-cramjam`](https://github.com/developmentseed/starlette-cramjam/)
2828

29+
## Documentation
30+
31+
[Full documentation is available on the website](https://developmentseed.org/stac-auth-proxy).
32+
33+
Head to [Getting Started](https://developmentseed.org/stac-auth-proxy/getting-started/) to dig in.
34+
2935
[pypi-version-badge]: https://badge.fury.io/py/stac-auth-proxy.svg
3036
[pypi-link]: https://pypi.org/project/stac-auth-proxy/
3137
[ghcr-version-badge]: https://ghcr-badge.egpl.dev/developmentseed/stac-auth-proxy/latest_tag?color=%2344cc11&ignore=latest&label=image+version&trim=

docs/user-guide/getting-started.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Getting Started
2+
3+
STAC Auth Proxy is a reverse proxy that adds authentication and authorization to your STAC API. It sits between clients and your STAC API, validating tokens to authenticate request and applying custom authorization rules.
4+
5+
## Core Requirements
6+
7+
To get started with STAC Auth Proxy, you need to provide two essential pieces of information:
8+
9+
### 1. OIDC Discovery URL
10+
11+
You need a valid OpenID Connect (OIDC) discovery URL that points to your identity provider's configuration. This URL typically follows the pattern:
12+
13+
```
14+
https://your-auth-provider.com/.well-known/openid-configuration
15+
```
16+
17+
> [!TIP]
18+
>
19+
> Common OIDC providers include:
20+
>
21+
> - **Auth0**: `https://{tenant-id}.auth0.com/.well-known/openid-configuration`
22+
> - **AWS Cognito**: `https://cognito-idp.{region}.amazonaws.com/{user-pool-id}/.well-known/openid-configuration`
23+
> - **Azure AD**: `https://login.microsoftonline.com/{tenant-id}/v2.0/.well-known/openid-configuration`
24+
> - **Google**: `https://accounts.google.com/.well-known/openid-configuration`
25+
> - **Keycloak**: `https://{keycloak-server}/auth/realms/{realm-id}/.well-known/openid-configuration`
26+
27+
### 2. Upstream STAC API URL
28+
29+
You need the URL to your upstream STAC API that the proxy will protect:
30+
31+
```
32+
https://your-stac-api.com/stac
33+
```
34+
35+
This should be a valid STAC API that conforms to the STAC specification.
36+
37+
## Quick Start
38+
39+
Here's a minimal example to get you started:
40+
41+
### Using Docker
42+
43+
```bash
44+
docker run -p 8000:8000 \
45+
-e UPSTREAM_URL=https://your-stac-api.com/stac \
46+
-e OIDC_DISCOVERY_URL=https://your-auth-provider.com/.well-known/openid-configuration \
47+
ghcr.io/developmentseed/stac-auth-proxy:latest
48+
```
49+
50+
### Using Python
51+
52+
1. Install the package:
53+
```bash
54+
pip install stac-auth-proxy
55+
```
56+
2. Set environment variables:
57+
```bash
58+
export UPSTREAM_URL=https://your-stac-api.com/stac
59+
export OIDC_DISCOVERY_URL=https://your-auth-provider.com/.well-known/openid-configuration
60+
```
61+
3. Run the proxy:
62+
```bash
63+
python -m stac_auth_proxy
64+
```
65+
66+
### Using Docker Compose
67+
68+
For development and experimentation, the codebase (ie within the repository, not within the Docker or Python distributions) ships with a `docker-compose.yaml` file, allowing the proxy to be run locally alongside various supporting services: the database, the STAC API, and a Mock OIDC provider.
69+
70+
#### pgSTAC Backend
71+
72+
Run the application stack with a pgSTAC backend using [stac-fastapi-pgstac](https://github.com/stac-utils/stac-fastapi-pgstac):
73+
74+
```sh
75+
docker compose up
76+
```
77+
78+
#### OpenSearch Backend
79+
80+
Run the application stack with an OpenSearch backend using [stac-fastapi-elasticsearch-opensearch](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch):
81+
82+
```sh
83+
docker compose --profile os up
84+
```
85+
86+
The proxy will start on `http://localhost:8000` by default.
87+
88+
## What Happens Next?
89+
90+
Once the proxy starts successfully:
91+
92+
1. **Health Check**: The proxy verifies your upstream STAC API is accessible
93+
2. **Conformance Check**: It ensures your STAC API conforms to required specifications
94+
3. **OIDC Discovery**: It fetches and validates your OIDC provider configuration
95+
4. **Ready**: The proxy is now ready to handle requests
96+
97+
## Testing Your Setup
98+
99+
You can test that your proxy is working by accessing the health endpoint:
100+
101+
```bash
102+
curl http://localhost:8000/healthz
103+
```
104+
105+
## Next Steps
106+
107+
- [Configuration Guide](configuration.md) - Learn about all available configuration options
108+
- [Route-Level Authentication](route-level-auth.md) - Configure which endpoints require authentication
109+
- [Record-Level Authentication](record-level-auth.md) - Set up content filtering based on user permissions

docs/user-guide/installation-and-running.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extra:
3030
nav:
3131
- Overview: index.md
3232
- User Guide:
33-
- Installation and Running: user-guide/installation-and-running.md
33+
- Getting Started: user-guide/getting-started.md
3434
- Configuration: user-guide/configuration.md
3535
- Route-Level Auth: user-guide/route-level-auth.md
3636
- Record-Level Auth: user-guide/record-level-auth.md

0 commit comments

Comments
 (0)