|  | 
| 1 | 1 | # Storage Extension Specification | 
| 2 | 2 | 
 | 
| 3 | 3 | - **Title:** Storage | 
| 4 |  | -- **Identifier:** <https://stac-extensions.github.io/storage/v1.0.0/schema.json> | 
|  | 4 | +- **Identifier:** <https://stac-extensions.github.io/storage/v2.0.0/schema.json> | 
| 5 | 5 | - **Field Name Prefix:** storage | 
| 6 |  | -- **Scope:** Item, Collection | 
|  | 6 | +- **Scope:** Item, Catalog, Collection | 
| 7 | 7 | - **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Pilot | 
| 8 |  | -- **Owner**: @davidraleigh @matthewhanson | 
|  | 8 | +- **Owner**: @matthewhanson @m-mohr | 
| 9 | 9 | 
 | 
| 10 | 10 | This document explains the Storage Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification. | 
| 11 |  | -It allows adding details related to cloud storage access and costs to be associated with STAC Assets. | 
|  | 11 | +It allows adding details related to cloud object storage access and costs to be associated with STAC Assets. | 
| 12 | 12 | This extension does not cover NFS solutions provided by PaaS cloud companies. | 
| 13 | 13 | 
 | 
| 14 | 14 | - Examples: | 
| 15 |  | -  - [Item example 1](examples/item-naip.json): Shows the basic usage of the extension in a STAC Item. | 
| 16 |  | -  - [Item example 2](examples/item-nsl.json): Another example of basic usage. | 
|  | 15 | +  - [NAIP Item with Alternate Assets](examples/item-naip.json): Shows a mixture of storage providers, including custom S3 hosts | 
|  | 16 | +    and the [alternate assets extension](https://github.com/stac-extensions/alternate-assets). | 
|  | 17 | +  - [Catalog with Link](examples/catalog-link.json): Shows the usage of the extension on a link in a STAC Catalog. | 
|  | 18 | +  - [Collection with Auth](examples/catalog-link.json): Shows the usage of the extension in a STAC Collecion in combination with the | 
|  | 19 | +    [authentication extension](https://github.com/stac-extensions/authentication). | 
| 17 | 20 | - [JSON Schema](json-schema/schema.json) | 
| 18 | 21 | - [Changelog](./CHANGELOG.md) | 
| 19 | 22 | 
 | 
| 20 | 23 | ## Fields | 
| 21 | 24 | 
 | 
| 22 | 25 | The fields in the table below can be used in these parts of STAC documents: | 
| 23 | 26 | 
 | 
|  | 27 | +- [x] Catalogs | 
|  | 28 | +- [x] Collections | 
|  | 29 | +- [x] Item Properties (incl. Summaries in Collections) | 
|  | 30 | +- [ ] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections) | 
|  | 31 | +- [ ] Links | 
|  | 32 | + | 
|  | 33 | +| Field Name        | Type                                                         | Description | | 
|  | 34 | +| ----------------- | ------------------------------------------------------------ | ----------- | | 
|  | 35 | +| `storage:schemes` | Map<string, [Storage Scheme Object](#storage-scheme-object)> | **REQUIRED.** A property that contains all of the storage schemes used by Assets and Links in the STAC Item, Catalog or Collection. | | 
|  | 36 | + | 
|  | 37 | +--- | 
|  | 38 | + | 
|  | 39 | +The fields in the table below can be used in these parts of STAC documents: | 
|  | 40 | + | 
| 24 | 41 | - [ ] Catalogs | 
| 25 | 42 | - [ ] Collections | 
| 26 |  | -- [x] Item Properties (incl. Summaries in Collections) | 
|  | 43 | +- [ ] Item Properties (incl. Summaries in Collections) | 
| 27 | 44 | - [x] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections) | 
| 28 |  | -- [ ] Links | 
|  | 45 | +- [x] Links | 
|  | 46 | +- [x] [Alternate Assets Object](https://github.com/stac-extensions/alternate-assets?tab=readme-ov-file#alternate-asset-object) | 
| 29 | 47 | 
 | 
| 30 |  | -| Field Name             | Type      | Description | | 
| 31 |  | -| ---------------------- | --------- | ----------- | | 
| 32 |  | -| storage:platform       | string    | The [cloud provider](#providers) where data is stored | | 
| 33 |  | -| storage:region         | string    | The region where the data is stored. Relevant to speed of access and inter region egress costs (as defined by PaaS provider) | | 
| 34 |  | -| storage:requester_pays | boolean   | Is the data requester pays or is it data manager/cloud provider pays. *Defaults to false* | | 
| 35 |  | -| storage:tier           | string    | The title for the tier type (as defined by PaaS provider) | | 
|  | 48 | +| Field Name     | Type       | Description | | 
|  | 49 | +| -------------- | ---------- | ----------- | | 
|  | 50 | +| `storage:refs` | \[string\] | A property that specifies which schemes in `storage:schemes` may be used to access an Asset or Link. Each value must be one of the keys defined in `storage:schemes`. | | 
| 36 | 51 | 
 | 
| 37 |  | -While these are all valid properties on an Item, they will typically be defined per-asset. If a field applies equally | 
| 38 |  | -to all assets (e.g., storage:platform=AWS if all assets are on AWS), then it should be specified in Item properties. | 
|  | 52 | +### Storage Scheme Object | 
| 39 | 53 | 
 | 
| 40 |  | -### Additional Field Information | 
|  | 54 | +| Field Name     | Type    | Description | | 
|  | 55 | +| -------------- | ------- | ----------- | | 
|  | 56 | +| type           | string  | **REQUIRED.** Type identifier for the platform, see below. | | 
|  | 57 | +| platform       | string  | **REQUIRED.** The cloud provider where data is stored as URI or URI template to the API. | | 
|  | 58 | +| region         | string  | The region where the data is stored. Relevant to speed of access and inter region egress costs (as defined by PaaS provider). | | 
|  | 59 | +| requester_pays | boolean | Is the data "requester pays" (`true`) or is it "data manager/cloud provider pays" (`false`). Defaults to `false`. | | 
|  | 60 | +| ...            | ...     | Additional properties as defined in the URL template or in the platform specific documents. | | 
| 41 | 61 | 
 | 
| 42 |  | -#### Providers | 
| 43 |  | -Currently this document is arranged to support object storage users of the following PaaS solutions: | 
|  | 62 | +The properties `title` and `description` as defined in Common Metadata should be used as well. | 
| 44 | 63 | 
 | 
| 45 |  | -- Alibaba Cloud (Aliyun): `ALIBABA` | 
| 46 |  | -- Amazon AWS: `AWS` | 
| 47 |  | -- Microsoft Azure: `AZURE` | 
| 48 |  | -- Google Cloud Platform: `GCP` | 
| 49 |  | -- IBM Cloud: `IBM` | 
| 50 |  | -- Oracle Cloud: `ORACLE` | 
| 51 |  | -- All other PaaS solutions: `OTHER` | 
|  | 64 | +#### platform | 
| 52 | 65 | 
 | 
| 53 |  | -The upper-cased values are meant to be used for `storage:platform`. | 
|  | 66 | +The `platform` field identifies the cloud provider where the data is stored as URI or URI template to the API of the service. | 
| 54 | 67 | 
 | 
| 55 |  | -#### Cloud Provider Storage Tiers | 
|  | 68 | +If a URI template is provided, all variables must be defined in the Storage Scheme Object as a property with the same name. | 
|  | 69 | +For example, the URI template `https://{bucket}.{region}.example.com` must have at least the properties | 
|  | 70 | +`bucket` and `region` defined: | 
| 56 | 71 | 
 | 
| 57 |  | -| Minimum Duration | [Google Cloud Platform](https://cloud.google.com/storage/docs/storage-classes) | [Amazon AWS](https://aws.amazon.com/s3/storage-classes/) | [Microsoft Azure](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers) | [IBM Cloud](https://cloud.ibm.com/objectstorage/create#pricing)  | [Oracle Cloud](https://www.oracle.com/cloud/storage/pricing.html) | [Alibaba Cloud](https://www.alibabacloud.com/product/oss/pricing) | | 
| 58 |  | -| ------------- | --------- | ------------------------ | ------- |----------  | ----------------- | ----------------- | | 
| 59 |  | -| 0 (Auto-Tier) |           | Intelligent-Tiering      |         | Smart Tier | | 
| 60 |  | -| 0 days        | STANDARD  | Standard                 | hot     | Standard   | Standard          | Standard          | | 
| 61 |  | -| 30 days       | NEARLINE  | Standard-IA, One Zone-IA | cool    | Vault      | Infrequent Access | Infrequent Access | | 
| 62 |  | -| 60 days       |           |                          |         |            |                   | Archive           | | 
| 63 |  | -| 90 days       | COLDLINE  | Glacier                  |         | Cold Vault | Archive           | | | 
| 64 |  | -| 180 days      |           | Glacier Deep Archive     | archive |            |                   | Cold Archive | | 
| 65 |  | -| 365 days      | ARCHIVE   |                          |         |            |                   | | | 
|  | 72 | +```json | 
|  | 73 | +{ | 
|  | 74 | +  "type": "example", | 
|  | 75 | +  "platform": "https://{bucket}.{region}.example.com", | 
|  | 76 | +  "region": "eu-fr", | 
|  | 77 | +  "bucket": "john-doe-stac", | 
|  | 78 | +  "requester_pays": true | 
|  | 79 | +} | 
|  | 80 | +``` | 
| 66 | 81 | 
 | 
| 67 |  | -## Contributing | 
|  | 82 | +In case an `href` contains a non-HTTP URL that is not directly resolvable, | 
|  | 83 | +the `platform` property must identify the host so that the URL can be resolved without further information. | 
|  | 84 | +For example, this is especially useful to provide the endpoint URL for custom S3 providers. | 
|  | 85 | +In this case the `platform` could effectively provide the endpoint URL. | 
| 68 | 86 | 
 | 
| 69 |  | -All contributions are subject to the | 
| 70 |  | -[STAC Specification Code of Conduct](https://github.com/radiantearth/stac-spec/blob/master/CODE_OF_CONDUCT.md). | 
| 71 |  | -For contributions, please follow the | 
| 72 |  | -[STAC specification contributing guide](https://github.com/radiantearth/stac-spec/blob/master/CONTRIBUTING.md) Instructions | 
| 73 |  | -for running tests are copied here for convenience. | 
|  | 87 | +#### type | 
| 74 | 88 | 
 | 
| 75 |  | -### Running tests | 
|  | 89 | +We try to collect pre-defined templates and best pratices for as many providers as possible | 
|  | 90 | +in this repository, but be aware that these are not part of the official extension releases. | 
|  | 91 | +This extension just provides the framework, the provider best pratices | 
|  | 92 | +may change at any time without a new version of this extension being released. | 
| 76 | 93 | 
 | 
| 77 |  | -The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid.  | 
| 78 |  | -To run tests locally, you'll need `npm`, which is a standard part of any [node.js installation](https://nodejs.org/en/download/). | 
|  | 94 | +The following providers have defined best pratices at this point: | 
| 79 | 95 | 
 | 
| 80 |  | -First you'll need to install everything with npm once. Just navigate to the root of this repository and on  | 
| 81 |  | -your command line run: | 
| 82 |  | -```bash | 
| 83 |  | -npm install | 
| 84 |  | -``` | 
|  | 96 | +| `type`      | Provider and Documentation | | 
|  | 97 | +| ----------- | -------------------------- | | 
|  | 98 | +| `aws-s3`    | [AWS S3](platforms/aws-s3.md) | | 
|  | 99 | +| `custom-s3` | [Generic S3 (non-AWS)](platforms/custom-s3.md) | | 
|  | 100 | +| `ms-azure`  | [Microsoft Azure](platforms/ms-azure.md) | | 
| 85 | 101 | 
 | 
| 86 |  | -Then to check markdown formatting and test the examples against the JSON schema, you can run: | 
| 87 |  | -```bash | 
| 88 |  | -npm test | 
| 89 |  | -``` | 
|  | 102 | +Feel encouraged to submit additional platform specifications via Pull Requests. | 
| 90 | 103 | 
 | 
| 91 |  | -This will spit out the same texts that you see online, and you can then go and fix your markdown or examples. | 
|  | 104 | +The `type` fields can be any value chosen by the implementor, | 
|  | 105 | +but the types defined in the table above should be used as defined in the best practices. | 
|  | 106 | +This ensures proper schema validation. | 
| 92 | 107 | 
 | 
| 93 |  | -If the tests reveal formatting problems with the examples, you can fix them with: | 
| 94 |  | -```bash | 
| 95 |  | -npm run format-examples | 
| 96 |  | -``` | 
|  | 108 | +## Contributing | 
|  | 109 | + | 
|  | 110 | +See the [Contributor documentation](CONTRIBUTING.md) for details. | 
0 commit comments