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
|sa:security| Map<string, [SecureAsset Object](#secure-asset-object)> |Keyword for asset security level. |
36
+
| security | Map<string, [SecureAsset Object](#secure-asset-object)> |Object that desribes the authenticated scheme and href|
37
37
38
38
### Additional Field Information
39
39
@@ -48,9 +48,108 @@ An Asset with the Secure Assets extension will have the following fields
48
48
49
49
| Field Name | Type | Description |
50
50
| ----------- | ------ | ----------- |
51
-
| href | string |**REQUIRED**. URI to the asset. Relative and abolsolute URI are both allowed |
52
-
| title | string | The displayed title for clients and users. |
53
-
| sa:security| string | Keyword for asset security level |
51
+
| scheme | string |**REQUIRED**. The authentification scheme used to access the data (`HttpClient`\|`S3Client`\|`PlanetaryComputerClient`\|`EarthdataClient`\|`SignedUrlClient`). |
52
+
| description | string | Additional instructions for authentification |
53
+
54
+
### Schemes
55
+
56
+
The authentification schemes align with the relevant clients included in the [stac-asset](https://github.com/stac-utils/stac-asset) library.
57
+
58
+
| Name | Description
59
+
| -- | -- |
60
+
|`HttpClient`| Simple HTTP client without any authentication |
61
+
| `S3Client` | Simple S3 client
62
+
| `PlanetaryComputerClient` | Signs URLs with the [Planetary Computer Authentication API](https://planetarycomputer.microsoft.com/docs/reference/sas/)
63
+
| `EarthdataClient` | Uses a token-based authentication to download data, from _some_ Earthdata providers, e.g. DAACs
64
+
| `SignedUrlClient` | Signs URLs with a user-defined Authentification API
65
+
66
+
### URL Signing
67
+
68
+
The `SignedUrlClient` scheme indicates that authentification will be handled by an API which generates and returns a signed URL. For example, a signed URL for assets in AWS S3 can be generated with the following Lambda function code.
The authentication API can be called clientside using an AWS S3 href (`https://<bucket>.s3.<region>.amazonaws.com/<key>`) with the following code snippet.
"description": "STAC Secure Assets Extension for STAC Items and STAC Collections.",
5
+
"description": "Secure Assets STAC Extension for STAC Items and STAC Collections.",
6
6
"oneOf": [
7
7
{
8
8
"$comment": "This is the schema for STAC Items.",
@@ -14,6 +14,7 @@
14
14
"type": "object",
15
15
"required": [
16
16
"type",
17
+
"properties",
17
18
"assets"
18
19
],
19
20
"properties": {
@@ -24,7 +25,7 @@
24
25
"$comment": "This validates the fields in Item Assets, but does not require them.",
25
26
"type": "object",
26
27
"additionalProperties": {
27
-
"$ref": "#/definitions/fields"
28
+
"$ref": "#/definitions/secure_asset"
28
29
}
29
30
}
30
31
}
@@ -63,7 +64,10 @@
63
64
"not": {
64
65
"allOf": [
65
66
{
66
-
"$ref": "#/definitions/fields"
67
+
"$ref": "#/definitions/require_any_field"
68
+
},
69
+
{
70
+
"$ref": "#/definitions/secure_asset"
67
71
}
68
72
]
69
73
}
@@ -85,14 +89,28 @@
85
89
"not": {
86
90
"allOf": [
87
91
{
88
-
"$ref": "#/definitions/fields"
92
+
"$ref": "#/definitions/require_any_field"
93
+
},
94
+
{
95
+
"$ref": "#/definitions/secure_asset"
89
96
}
90
97
]
91
98
}
92
99
}
93
100
}
94
101
}
95
102
}
103
+
},
104
+
{
105
+
"$comment": "This is the schema for the fields in Summaries. By default, only checks the existence of the properties, but not the schema of the summaries.",
106
+
"required": [
107
+
"summaries"
108
+
],
109
+
"properties": {
110
+
"summaries": {
111
+
"$ref": "#/definitions/require_any_field"
112
+
}
113
+
}
96
114
}
97
115
]
98
116
}
@@ -115,21 +133,25 @@
115
133
"require_any_field": {
116
134
"$comment": "Please list all fields here so that we can force the existence of one of them in other parts of the schemas.",
117
135
"anyOf": [
118
-
{"required": ["sa:security"]}
136
+
{"required": ["security", "secure_asset:scheme"]}
119
137
]
120
138
},
121
-
"fields": {
139
+
"secure_asset": {
122
140
"$comment": "Add your new fields here. Don't require them here, do that above in the corresponding schema.",
0 commit comments