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
Copy file name to clipboardExpand all lines: README.md
+57-13Lines changed: 57 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,9 @@
53
53
-[Filter Extension](#filter-extension)
54
54
-[Query Extension](#query-extension)
55
55
-[Aggregation](#aggregation)
56
-
-[Hidden collections filter for authorization](#hidden-collections-filter-for-authorization)
56
+
-[Collections and filter parameters for authorization](#collections-and-filter-parameters-for-authorization)
57
+
-[Collections](#collections)
58
+
-[CQL2 Filter](#cql2-filter)
57
59
-[Ingesting Data](#ingesting-data)
58
60
-[Ingest actions](#ingest-actions)
59
61
-[Ingesting large items](#ingesting-large-items)
@@ -609,7 +611,8 @@ There are some settings that should be reviewed and updated as needeed in the se
609
611
| CORS_CREDENTIALS | Configure whether or not to send the `Access-Control-Allow-Credentials` CORS header. Header will be sent if set to `true`. | none |
610
612
| CORS_METHODS | Configure whether or not to send the `Access-Control-Allow-Methods` CORS header. Expects a comma-delimited string, e.g., `GET,PUT,POST`. | `GET,HEAD,PUT,PATCH,POST,DELETE` |
611
613
| CORS_HEADERS | Configure whether or not to send the `Access-Control-Allow-Headers` CORS header. Expects a comma-delimited string, e.g., `Content-Type,Authorization`. If not specified, defaults to reflecting the headers specified in the request’s `Access-Control-Request-Headers` header. | none |
612
-
| ENABLE_COLLECTIONS_AUTHX | Enables support for hidden `_collections` query parameter / field when set to `true`. | none (not enabled) |
614
+
| ENABLE_COLLECTIONS_AUTHX | Enables support for parameter to restrict collections when set to `true`. | none (not enabled) |
615
+
| ENABLE_FILTER_AUTHX | Enables support for parameter to restrict items when set to `true`. | none (not enabled) |
613
616
| ENABLE_THUMBNAILS | Enables support for presigned thumbnails. | none (not enabled) |
614
617
| ENABLE_INGEST_ACTION_TRUNCATE | Enables support for ingest action "truncate". | none (not enabled) |
615
618
| ENABLE_RESPONSE_COMPRESSION | Enables response compression. Set to 'false' to disable. | enabled |
@@ -618,6 +621,9 @@ There are some settings that should be reviewed and updated as needeed in the se
618
621
Additionally, the credential for OpenSearch must be configured, as decribed in the
619
622
section [Populating and accessing credentials](#populating-and-accessing-credentials).
620
623
624
+
If using STAC Server with a proxy in front of it, the base URL for the server, which
625
+
will be used in all link URLs in response bodies, can be set with the `STAC-Endpoint` header.
626
+
621
627
After reviewing the settings, build and deploy:
622
628
623
629
```shell
@@ -1118,16 +1124,32 @@ Available aggregations are:
1118
1124
- geometry_geohash_grid_frequency ([geohash grid](https://opensearch.org/docs/latest/aggregations/bucket/geohash-grid/) on Item.geometry)
1119
1125
- geometry_geotile_grid_frequency ([geotile grid](https://opensearch.org/docs/latest/aggregations/bucket/geotile-grid/) on Item.geometry)
1120
1126
1121
-
## Hidden collections filter for authorization
1127
+
## Collections and filter parameters for authorization
1122
1128
1123
-
All endpoints that involve the use of Collections support the use of a "hidden" query
1124
-
parameter named (for GET requests) or body JSON field (for POST requests) named
1125
-
`_collections`that can be used by an authorization proxy (e.g., a pre-hook Lambda)
1126
-
to filter the collections a user has access to. This parameter/field will be excluded
1127
-
from pagination links, so it does not need to be removed on egress.
1129
+
One key concern in stac-server is how to restrict user's access to items. These
1130
+
features allow this introducing support for injecting values at runtime (e.g., in a
1131
+
proxy or pre-hook Lambda) to restrict items by collection or by CQL2 filter.
1132
+
1133
+
### Collections
1128
1134
1129
1135
This feature must be enabled with the `ENABLE_COLLECTIONS_AUTHX` configuration.
1130
1136
1137
+
All endpoints that involve the use of Collections support the use of a additional
1138
+
parameter that indicates which collections a user should have access to. This parameter
1139
+
can be injected as:
1140
+
1141
+
1. GET request - a query parameter `_collections`
1142
+
2. POST request - a body field `_collections`
1143
+
3. All requests - an HTTP header `stac-collections-authx`
1144
+
1145
+
This parameter/field will be excluded
1146
+
from pagination links, so it does not need to be removed on egress.
1147
+
1148
+
If this behavior is enabled and a parameter is not passed or is passed
1149
+
with an empty string or empty list, the caller will not have access to any collections.
1150
+
When `*` is included in the list of collections (presumably as the only value), the caller
1151
+
will have access to all collections.
1152
+
1131
1153
The endpoints this applies to are:
1132
1154
1133
1155
- /collections
@@ -1141,13 +1163,35 @@ The endpoints this applies to are:
1141
1163
- /search
1142
1164
- /aggregate
1143
1165
1144
-
The five endpoints of the Transaction Extension do not use this parameter, as there are
1166
+
The five endpoints of the Transaction Extension do not use these parameters, as there are
1145
1167
other authorization considerations for these, that are left as future work.
1146
1168
1147
-
If this behavior is enabled and a `_collections` parameter is not passed or is passed
1148
-
with an empty string or empty list, the caller will not have access to any collections.
1149
-
When `*` is included in the list of collections (ideally as the only value), the caller
1150
-
will have access to all collections.
1169
+
### CQL2 Filter
1170
+
1171
+
This feature must be enabled with the `ENABLE_FILTER_AUTHX` configuration.
1172
+
1173
+
All endpoints that involve items support the use of a additional
1174
+
parameter that indicates which items a user should have access to. This parameter
1175
+
can be injected as:
1176
+
1177
+
1. GET request - a query parameter `_filter`
1178
+
2. POST request - a body field `_filter`
1179
+
3. All requests - an HTTP header `stac-filter-authx`
1180
+
1181
+
This parameter/field will be excluded
1182
+
from pagination links, so it does not need to be removed on egress.
0 commit comments