@@ -53,72 +53,75 @@ uvicorn --factory stac_auth_proxy:create_app
53
53
54
54
The application is configurable via environment variables.
55
55
56
- - ` UPSTREAM_URL ` , STAC API URL
57
- - ** Type:** HTTP(S) URL
58
- - ** Required:** Yes
59
- - ** Example:** ` https://your-stac-api.com/stac `
60
- - ` OIDC_DISCOVERY_URL ` , OpenID Connect discovery document URL
61
- - ** Type:** HTTP(S) URL
62
- - ** Required:** Yes
63
- - ** Example:** ` https://auth.example.com/.well-known/openid-configuration `
64
- - ` OIDC_DISCOVERY_INTERNAL_URL ` , internal network OpenID Connect discovery document URL
65
- - ** Type:** HTTP(S) URL
66
- - ** Required:** No, defaults to the value of ` OIDC_DISCOVERY_URL `
67
- - ** Example:** ` http://auth/.well-known/openid-configuration `
68
- - ` WAIT_FOR_UPSTREAM ` , wait for upstream API to become available before starting proxy
69
- - ** Type:** boolean
70
- - ** Required:** No, defaults to ` true `
71
- - ** Example:** ` false ` , ` 1 ` , ` True `
72
- - ` HEALTHZ_PREFIX ` , prefix for health check endpoints
73
- - ** Type:** string
74
- - ** Required:** No, defaults to ` /healthz `
75
- - ** Example:** ` '' ` (disabled)
76
- - ` OPENAPI_SPEC_ENDPOINT ` , path of OpenAPI specification, used for augment spec response with auth configuration
77
- - ** Type:** string or null
78
- - ** Required:** No, defaults to ` null ` (disabled)
79
- - ** Example:** ` /api `
80
- - ` DEFAULT_PUBLIC ` , default access policy for endpoints
81
- - ** Type:** boolean
82
- - ** Required:** No, defaults to ` false `
83
- - ** Example:** ` false ` , ` 1 ` , ` True `
84
- - ` PRIVATE_ENDPOINTS ` , endpoints explicitly marked as requiring authentication, used when ` DEFAULT_PUBLIC == True `
85
- - ** Type:** JSON object mapping regex patterns to HTTP methods OR tuples of HTTP methods and an array of strings representing required scopes
86
- - ** Required:** No, defaults to the following:
87
- ``` json
88
- {
89
- "^/collections$" : [" POST" ],
90
- "^/collections/([^/]+)$" : [" PUT" , " PATCH" , " DELETE" ],
91
- "^/collections/([^/]+)/items$" : [" POST" ],
92
- "^/collections/([^/]+)/items/([^/]+)$" : [" PUT" , " PATCH" , " DELETE" ],
93
- "^/collections/([^/]+)/bulk_items$" : [" POST" ]
94
- }
95
- ```
96
- - `PUBLIC_ENDPOINTS`, endpoints explicitly marked as not requiring authentication, used when `DEFAULT_PUBLIC == False`
97
- - **Type:** JSON object mapping regex patterns to HTTP methods
98
- - **Required:** No, defaults to the following:
99
- ```json
100
- {
101
- "^/api.html$" : [" GET" ],
102
- "^/api$" : [" GET" ]
103
- }
104
- ```
105
- - `ITEMS_FILTER`, cql2 expression generator for item-level filtering
106
- - **Type:** JSON object with class configuration
107
- - **Required:** No, defaults to `null` (disabled)
108
- - **Components**:
109
- - `cls`: Python import path
110
- - `args`: List of positional arguments
111
- - `kwargs`: Dictionary of keyword arguments
112
- - **Example:**
113
- ```json
114
- {
115
- "cls" : " my_package.filters.OrganizationFilter" ,
116
- "args" : [" org1" ],
117
- "kwargs" : {
118
- "field_name" : " properties.organization"
56
+ - ** Core**
57
+ - ` UPSTREAM_URL ` , STAC API URL
58
+ - ** Type:** HTTP(S) URL
59
+ - ** Required:** Yes
60
+ - ** Example:** ` https://your-stac-api.com/stac `
61
+ - ` WAIT_FOR_UPSTREAM ` , wait for upstream API to become available before starting proxy
62
+ - ** Type:** boolean
63
+ - ** Required:** No, defaults to ` true `
64
+ - ** Example:** ` false ` , ` 1 ` , ` True `
65
+ - ` HEALTHZ_PREFIX ` , path prefix for health check endpoints
66
+ - ** Type:** string
67
+ - ** Required:** No, defaults to ` /healthz `
68
+ - ** Example:** ` '' ` (disabled)
69
+ - ** Authentication**
70
+ - ` OIDC_DISCOVERY_URL ` , OpenID Connect discovery document URL
71
+ - ** Type:** HTTP(S) URL
72
+ - ** Required:** Yes
73
+ - ** Example:** ` https://auth.example.com/.well-known/openid-configuration `
74
+ - ` OIDC_DISCOVERY_INTERNAL_URL ` , internal network OpenID Connect discovery document URL
75
+ - ** Type:** HTTP(S) URL
76
+ - ** Required:** No, defaults to the value of ` OIDC_DISCOVERY_URL `
77
+ - ** Example:** ` http://auth/.well-known/openid-configuration `
78
+ - ` DEFAULT_PUBLIC ` , default access policy for endpoints
79
+ - ** Type:** boolean
80
+ - ** Required:** No, defaults to ` false `
81
+ - ** Example:** ` false ` , ` 1 ` , ` True `
82
+ - ` PRIVATE_ENDPOINTS ` , endpoints explicitly marked as requiring authentication, used when ` DEFAULT_PUBLIC == True `
83
+ - ** Type:** JSON object mapping regex patterns to HTTP methods OR tuples of HTTP methods and an array of strings representing required scopes
84
+ - ** Required:** No, defaults to the following:
85
+ ``` json
86
+ {
87
+ "^/collections$" : [" POST" ],
88
+ "^/collections/([^/]+)$" : [" PUT" , " PATCH" , " DELETE" ],
89
+ "^/collections/([^/]+)/items$" : [" POST" ],
90
+ "^/collections/([^/]+)/items/([^/]+)$" : [" PUT" , " PATCH" , " DELETE" ],
91
+ "^/collections/([^/]+)/bulk_items$" : [" POST" ]
119
92
}
120
- }
121
- ```
93
+ ```
94
+ - `PUBLIC_ENDPOINTS`, endpoints explicitly marked as not requiring authentication, used when `DEFAULT_PUBLIC == False`
95
+ - **Type:** JSON object mapping regex patterns to HTTP methods
96
+ - **Required:** No, defaults to the following:
97
+ ```json
98
+ {
99
+ "^/api.html$" : [" GET" ],
100
+ "^/api$" : [" GET" ]
101
+ }
102
+ ```
103
+ - `OPENAPI_SPEC_ENDPOINT`, path of OpenAPI specification, used for augmenting spec response with auth configuration
104
+ - **Type:** string or null
105
+ - **Required:** No, defaults to `null` (disabled)
106
+ - **Example:** `/api`
107
+ - **Filtering**
108
+ - `ITEMS_FILTER`, [cql2 expression](https://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) generator for item-level filtering
109
+ - **Type:** JSON object with class configuration
110
+ - **Required:** No, defaults to `null` (disabled)
111
+ - **Components**:
112
+ - `cls`: Python import path
113
+ - `args`: List of positional arguments
114
+ - `kwargs`: Dictionary of keyword arguments
115
+ - **Example:**
116
+ ```json
117
+ {
118
+ "cls" : " my_package.filters.OrganizationFilter" ,
119
+ "args" : [" org1" ],
120
+ "kwargs" : {
121
+ "field_name" : " properties.organization"
122
+ }
123
+ }
124
+ ```
122
125
123
126
### Customization
124
127
0 commit comments