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
We have implemented support for STAC Auth Proxy integration with eoAPI-K8S through service-specific ingress control. This feature allows the STAC service to be accessible only internally while other services remain externally available.
15
+
STAC Auth Proxy integration allows the STAC service to be accessible only through an authenticated proxy while other eoAPI services remain externally available.
16
16
17
-
## Implementation Details
18
-
19
-
### 1. Service-Specific Ingress Control
20
-
21
-
Each service can now independently control its ingress settings via the values.yaml configuration:
22
-
23
-
```yaml
24
-
stac:
25
-
enabled: true
26
-
ingress:
27
-
enabled: false # Disable external ingress for STAC only
28
-
29
-
# Other services remain externally accessible
30
-
raster:
31
-
enabled: true
32
-
ingress:
33
-
enabled: true
34
-
```
35
-
36
-
## Deployment Guide
17
+
## Deployment
37
18
38
19
### 1. Configure eoAPI-K8S
39
20
21
+
Disable external STAC ingress and configure root path:
22
+
40
23
```yaml
41
24
# values.yaml for eoapi-k8s
42
25
stac:
43
26
enabled: true
27
+
overrideRootPath: ""# No --root-path argument (proxy handles prefix)
44
28
ingress:
45
-
enabled: false #No external ingress for STAC
29
+
enabled: false #Required: prevents unauthenticated direct access
46
30
47
31
# Other services remain externally accessible
48
32
raster:
49
33
enabled: true
50
34
vector:
51
35
enabled: true
52
-
multidim:
53
-
enabled: true
54
36
```
55
37
56
38
### 2. Deploy STAC Auth Proxy
57
39
58
-
Deploy the stac-auth-proxy Helm chart in the same namespace:
40
+
Configure stac-auth-proxy subchart to point to the STAC service:
- Other services (raster, vector, etc.) accessible via their ingress paths
97
-
- Auth proxy successfully routing authenticated requests to STAC
98
-
99
-
## Troubleshooting
100
-
101
-
1.**STAC Service Not Accessible Internally**
102
-
- Verify service is running: `kubectl get services`
103
-
- Check service port matches auth proxy configuration
104
-
- Verify network policies allow proxy-to-STAC communication
105
-
106
-
2.**Other Services Affected**
107
-
- Confirm ingress configuration for other services
108
-
- Check ingress controller logs
109
-
- Verify service-specific settings in values.yaml
110
-
111
-
## Root Path Configuration for Direct Service Access
112
-
113
-
### Understanding usage of overrideRootPath with stac-auth-proxy
114
-
115
-
When deploying the eoAPI-K8S with the STAC service behind a stac-auth-proxy, you may want to configure the `stac.overrideRootPath` parameter to control how the FastAPI application handles root path prefixes. This is particularly useful when the auth proxy is responsible for managing the `/stac` path prefix.
116
-
117
-
When deploying stac-auth-proxy in front of the eoAPI service, you may need to configure the root path behavior to avoid URL conflicts. The `stac.overrideRootPath` parameter allows you to control how the STAC FastAPI application handles root path prefixes.
118
-
119
-
### Setting overrideRootPath to Empty String
120
-
121
-
For stac-auth-proxy deployments, you often want to set `stac.overrideRootPath` to an empty string:
ALLOWED_JWT_AUDIENCES: "https://your-api-audience.com"# Recommended: should match the audience configured in your identity provider for this API.
50
+
ROOT_PATH: "/stac"
130
51
```
131
52
132
-
**Important**: This configuration creates an **intentional inconsistency**:
133
-
134
-
- **Ingress routes**: Still configured for `/stac` (if ingress was enabled)
135
-
- **FastAPI application**: Runs without any root path prefix (no `--root-path` argument)
136
-
137
-
### Why This Works for stac-auth-proxy
53
+
For complete configuration options, see the [stac-auth-proxy configuration documentation](https://developmentseed.org/stac-auth-proxy/user-guide/configuration).
138
54
139
-
This behavior is specifically designed for stac-auth-proxy scenarios where:
55
+
### 3. Authentication Policy
140
56
141
-
1. **stac-auth-proxy** receives requests via its own ingress and handles the `/stac` path prefix
142
-
2. **stac-auth-proxy** filters requests managing the `/stac` prefix and forwards them directly to the STAC service without the path prefix
143
-
3. **STAC service** responds from its internal service as if it's running at the root path `/`
144
-
145
-
### Configuration Examples
146
-
147
-
#### Standard Deployment (with ingress)
57
+
Control which endpoints require authentication:
148
58
149
59
```yaml
150
-
stac:
151
-
enabled: true
152
-
# Default behavior - uses ingress.path as root-path
153
-
ingress:
154
-
enabled: true
155
-
path: "/stac"
60
+
stac-auth-proxy:
61
+
env:
62
+
# Set a default policy: read operations (GET) are public, write operations (POST, PUT, PATCH, DELETE) require authentication
63
+
DEFAULT_PUBLIC: "true"# This is "false" if not specified
64
+
65
+
# Alternatively, you may set your custom policies (JSON objects)
Or, you can also create more complex custom filters (see [upstream documentation](https://developmentseed.org/stac-auth-proxy/user-guide/record-level-auth/#custom-filter-factories)). For this you will need to add the extra file and configure **all three** requirements:
161
83
162
84
```yaml
163
-
stac:
164
-
enabled: true
165
-
overrideRootPath: "" # Empty string - no --root-path argument
Result: FastAPI runs without `--root-path` argument
171
-
172
-
#### Custom Root Path
106
+
**Note**: All three components are required. `customFiltersFile` creates the ConfigMap, `extraVolumes` references it, `extraVolumeMounts` loads it into the container.
173
107
174
-
```yaml
175
-
stac:
176
-
enabled: true
177
-
overrideRootPath: "/api/v1/stac" # Custom path
178
-
```
108
+
## Root Path Behavior
179
109
180
-
Result: FastAPI runs with `--root-path=/api/v1/stac`
110
+
### Why `overrideRootPath: ""`
181
111
182
-
### Request Flow with stac-auth-proxy
112
+
stac-auth-proxy manages the `/stac` prefix and forwards requests without it to the STAC service. Setting `overrideRootPath: ""` removes the `--root-path` argument so FastAPI responds as if running at root `/`.
0 commit comments